Minio Backup container for MongoDB
This container provides a trivially simple means to run mongodump
and fire the results off
to a Minio instance. It is intended to be run in conjunction with a Kubernetes CronJob
to maintain a frequent backup of your critical data with minimal fuss.
- Dumps a single MongoDB database to an S3 bucket
- Lightweight and short lived
- Simple and readable implementation
- Optional encryption for archive file
docker run --rm --env-file backup.env minback/mongo my_db -h mongoserver1
MINIO_SERVER=https://play.minio.io/
MINIO_ACCESS_KEY=minio
MINIO_SECRET_KEY=miniosecret
MINIO_BUCKET=backups
DB_NAME [OPTIONS...]
Arguments
DB_NAME - The name of the database you wish to backup
OPTIONS - Any additional options you wish to pass to mongodump
This container is configured using environment variables, enabling it to easily be started manually or automatically and integrate well with Kubernetes' configuration framework.
The Minio server you wish to send backups to.
The Access Key used to connect to your Minio server.
The Secret Key used to connect to your Minio server.
The Minio bucket you wish to store your backup in.
(Optional) The OpenSSL symmetric key to protect the archive with. Should be sufficiently long to prevent dictionary based attacks.
The date format you would like to use when naming your backup files. Files are named $DB-$DATE.archive
.