Snapshot of stefanprodan/mgob: 760★, Go, Developer Tools. MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This project is no longer maintained.
I lost interest in MongoDB some years ago and I can't drive an OSS project forward in my spare time without being passioned about it.
But MGOB lives on thanks to @maxisam. The new home of MGOB is https://github.com/maxisam/mgob
MGOB is a MongoDB backup automation tool built with Go.
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 supported storage
notifications (Email, Slack)
instrumentation with Prometheus
http file server for local backups and logs
distributed as an Alpine Docker image
Install
MGOB is available on Docker Hub at stefanprodan/mgob.
A step by step guide on running MGOB as a StatefulSet with PersistentVolumeClaims can be found here.
Configure
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.
Backup plan
scheduler:
# run every day at 6:00 and 18:00 UTC
cron: "0 6,18 */1 * *"
# number of backups to keep locally
retention: 14
# backup operation timeout in minutes
timeout: 60
target:
# mongod IP or host name
host: "172.18.7.21"
# mongodb port
port: 27017
# mongodb database name, leave blank to backup all databases
database: "test"
# leave blank if auth is not enabled
username: "admin"
password: "secret"
# add custom params to mongodump (eg. Auth or SSL support), leave blank if not needed
params: "--ssl --authenticationDatabase admin"
# Encryption (optional)
encryption:
# At the time being, only gpg asymmetric encryption is supported
# Public key file or at least one recipient is mandatory
gpg:
# optional path to a public key file, only the first key is used.
keyFile: /secret/mgob-key/key.pub
# optional key server, defaults to hkps://keys.openpgp.org
keyServer: hkps://keys.openpgp.org
# optional list of recipients, they will be looked up on key server
recipients:
- [email protected]
# S3 upload (optional)
s3:
url: "https://play.minio.io:9000"
bucket: "backup"
# accessKey and secretKey are optional for AWS, if your Docker image has awscli
accessKey: "Q3AM3UQ867SPQQA43P2F"
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
# Optional, only used for AWS (when awscli is present)
# The customer-managed AWS Key Management Service (KMS) key ID that should be used to
# server-side encrypt the backup in S3
#kmsKeyId:
# Optional, only used for AWS (when awscli is present)
# Valid choices are: STANDARD | REDUCED_REDUNDANCY | STANDARD_IA | ONE-
# ZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE.
# Defaults to 'STANDARD'
#storageClass: STANDARD
# For Minio and AWS use S3v4 for GCP use S3v2
api: "S3v4"
# GCloud upload (optional)
gcloud:
bucket: "backup"
keyFilePath: /path/to/service-account.json
# Azure blob storage upload (optional)
azure:
containerName: "backup"
connectionString: "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net"
# Rclone upload (optional)
rclone:
bucket: "my-backup-bucket"
# See https://rclone.org/docs/ for details on how to configure rclone
configFilePath: /etc/rclone.conf
configSection: "myrclonesection"
# SFTP upload (optional)
sftp:
host: sftp.company.com
port: 2022
username: user
password: secret
# you can also specify path to a private key and a passphrase
private_key: /etc/ssh/ssh_host_rsa_key
passphrase: secretpassphrase
# dir must exist on the SFTP server
dir: backup
# Email notifications (optional)
smtp:
server: smtp.company.com
port: 465
username: user
password: secret
from: [email protected]
to:
- [email protected]
- [email protected]
# Slack notifications (optional)
slack:
url: https://hooks.slack.com/services/xxxx/xxx/xx
channel: devops-alerts
username: mgob
# 'true' to notify only on failures
warnOnly: false
In order to restore from a local backup you have two options:
Browse mgob-host:8090/storage to identify the backup you want to restore.
Login to your MongoDB server and download the archive using curl and restore the backup with mongorestore command line.
You can also restore a backup from within mgob container.
Exec into mgob, identify the backup you want to restore and use mongorestore to connect to your MongoDB server.
docker exec -it mgob sh
ls /storage/mongo-test
mongorestore --gzip --archive=/storage/mongo-test/mongo-test-1494056760.gz --host mongohost:27017 --drop
No homepage URL was recorded for stefanprodan/mgob in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on stefanprodan/mgob?
The most recent commit recorded on stefanprodan/mgob was 4.0 years ago, based on the GitHub push timestamp. The repository has 149 forks — one of the better signals of community interest.
Is stefanprodan/mgob open source?
Yes — stefanprodan/mgob ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/stefanprodan/mgob.
What license does stefanprodan/mgob use?
stefanprodan/mgob is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is stefanprodan/mgob associated with?
GitHub's repository topics for stefanprodan/mgob: "backup", "docker", "kubernetes", "mongodb", "s3-storage", "sftp". TopGit's editorial category is Developer Tools.
Where do I read more about stefanprodan/mgob?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/stefanprodan/mgob is the definitive source.
Read full README in the tab above.
Is mgob worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of mgob.