https://github.com/maxisam/mgob
MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
https://github.com/maxisam/mgob
backup docker kubernetes mongodb s3-storage
Last synced: about 1 month ago
JSON representation
MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
- Host: GitHub
- URL: https://github.com/maxisam/mgob
- Owner: maxisam
- License: mit
- Created: 2022-08-21T05:34:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T01:08:41.000Z (3 months ago)
- Last Synced: 2025-04-13T00:43:42.383Z (about 1 month ago)
- Topics: backup, docker, kubernetes, mongodb, s3-storage
- Language: Go
- Homepage: https://maxisam.github.io/mgob/
- Size: 5.57 MB
- Stars: 173
- Watchers: 4
- Forks: 27
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# mgob
[](https://github.com/maxisam/mgob/actions/workflows/release.yml)
[](https://github.com/maxisam/mgob/actions/workflows/build.yml)
[](https://hub.docker.com/r/maxisam/mgob/)
[](https://GitHub.com/maxisam/mgob/releases/)
[](https://github.com/sponsors/maxisam)
**MGOB** is a MongoDB backup automation tool designed using Go. This fork introduces a variety of enhancements over the original repository by [stefanprodan](https://github.com/stefanprodan/mgob), which is set to be archived. Check out the [archival discussion here](https://github.com/stefanprodan/mgob/issues/161).
> Note: New features are being added to this fork exclusively.
## Enhancements in This Fork
- Backup validation
- Retry mechanism for backups
- MS Team notification support
- Updated email notification mechanism addressing the [certificate issue](https://github.com/stefanprodan/mgob/issues/160)
- Go updated to 1.21
- Dependencies updated
- Introduced `warnOnly` option for all notification channels
- Integrated Github Actions for CI/CD
- New Helm Chart with enhanced metrics, liveness probe, and other features
- Multiple Docker image releases catering to different backup solutions
- Option to skip local backup when retention is set to 0 ([#42](https://github.com/maxisam/mgob/pull/42), Credit: @aneagoe)
- On-demand restore API
- Load config from environment variables to override config file. syntax: `PLAN_ID__KEY_PROPERTY` (e.g. `mongo_test__SMTP_SERVER=smtp.company.com`)### Helm Chart
```bash
helm pull oci://registry-1.docker.io/maxisam/mgob --version 2.1.0
helm upgrade oci://registry-1.docker.io/maxisam/mgob --version
```### Breaking Changes
- v2: in config, sftp.private_key -> sftp.privateKey
## Original Features
- schedule backups
- local backups retention
- upload to S3 Object Storage (Minio, AWS, Google Cloud, Azure)
- upload to gcloud storage
- upload to SFTP
- upload to any [Rclone](https://rclone.org/) supported storage
- notifications (Email, Slack)
- instrumentation with Prometheus
- http file server for local backups and logs
- distributed as an Alpine Docker image## Installation
MGOB is available on Docker Hub at [maxisam/mgob](https://hub.docker.com/r/maxisam/mgob).
Supported tags:
- `maxisam/mgob:latest` latest stable [release](https://github.com/maxisam/mgob/releases)
Compatibility matrix:
| MGOB | MongoDB |
| ------------------------ | ------- |
| `stefanprodan/mgob:0.9` | 3.4 |
| `stefanprodan/mgob:0.10` | 3.6 |
| `stefanprodan/mgob:1.0` | 4.0 |
| `stefanprodan/mgob:1.1` | 4.2 |
| `maxisam/mgob:1.10` | 5.0 |
| `maxisam/mgob:1.12` | 7.0 |Docker:
```bash
docker run -dp 8090:8090 --name mgob \
-v "/mgob/config:/config" \
-v "/mgob/storage:/storage" \
-v "/mgob/tmp:/tmp" \
-v "/mgob/data:/data" \
stefanprodan/mgob \
-LogLevel=info
```## Configuration
Define a backup plan (yaml format) for each database you want to backup inside the `config` dir.
The yaml file name is being used as the backup plan ID, no white spaces or special characters are allowed.[READ MORE](.document/BACKUP_PLAN.md)
## On-Demand Operations
MGOB exposes a set of HTTP endpoints for on-demand operations like backup, restore, status, metrics, and version.
READ MORE: [On-Demand Operations](.document/ON_DEMAND_OPERATION.md)
## Logs
READ MORE: [Logs](.document/LOGS.md)
## Metrics
READ MORE: [Metrics](.document/METRICS.md)
## Restore
READ MORE: [Restore](.document/RESTORE.md)
## Special Thanks
- [stefanprodan](https://github.com/stefanprodan) for the original repository
- [](https://github.com/derangeddk)
First awesome sponsor!!## Sponsors [](https://github.com/sponsors/maxisam)