stefanprodan/mgob hiện có 760 sao trên GitHub, viết chủ yếu bằng Go. MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/stefanprodan/mgob là nguồn chính thức.
stefanprodan/mgob có những chủ đề gì?
GitHub topics của stefanprodan/mgob: "backup", "docker", "kubernetes", "mongodb", "s3-storage", "sftp". TopGit xếp repo vào nhóm Developer Tools.
stefanprodan/mgob có phải mã nguồn mở không?
Có — stefanprodan/mgob phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/stefanprodan/mgob.
stefanprodan/mgob có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho stefanprodan/mgob. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
stefanprodan/mgob còn đang phát triển không?
Commit gần nhất trên stefanprodan/mgob là 4.0 năm trước (theo timestamp GitHub). Repo có 149 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
stefanprodan/mgob dùng license gì?
stefanprodan/mgob phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc mgob có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về mgob.