BrammyS / mongodump-docker

Backup your Mongodb database with cron inside of a docker container!

Home Page:https://hub.docker.com/r/brammys/mongodump

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mongodump-docker

Backup your Mongodb database with cron inside of a docker container!

Examples

Run the backup task at 05:00 on Sunday and delete the backups after 14 days.

 docker run -v ./localBackupsDir:/backups -e "MONGO_URI=mongodb+srv://username:password@mongodb-cluster.mongodb.net" -e DELETE_AFTER=14 -e "CRON_SCHEDULE=0 5 * * sun" --name mongodump brammys/mongodump

Supported tags and respective Dockerfile links

Configurations

ENV variable Default value Description
MONGO_URI mongodb://mongo:27017 The Mongodb URI
CRON_SCHEDULE 0 0 * * * The cron schedule expression.
DELETE_AFTER The amount of days after the backups will be deleted. Leave empty to keep all backups.

Volumes

path Description
/backups The backup folder for the mongodumps.

About

Backup your Mongodb database with cron inside of a docker container!

https://hub.docker.com/r/brammys/mongodump

License:Apache License 2.0


Languages

Language:Dockerfile 65.4%Language:Shell 34.6%