Sign inSign up

redream/mongo-backup

By redream

•Updated about 7 years ago

Image
0

91

redream/mongo-backup repository overview

⁠Usage
docker run -d \
    --env MONGODB_HOST=mongodb.host \
    --env MONGODB_PORT=27017 \
    --env MONGODB_USER=admin \
    --env MONGODB_PASS=password \
    --volume host.folder:/backup
    tutum/mongodb-backup

docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_PASS="mypass" --name mongodb tutum/mongodb
docker run -d --link mongodb:mongodb -v host.folder:/backup tutum/mongodb-backup

⁠Parameters
MONGODB_HOST    the host/ip of your mongodb database
MONGODB_PORT    the port number of your mongodb database
MONGODB_USER    the username of your mongodb database. If MONGODB_USER is empty while MONGODB_PASS is not, the image will use admin as the default username
MONGODB_PASS    the password of your mongodb database
MONGODB_DB      the database name to dump. If not specified, it will dump all the databases
EXTRA_OPTS      the extra options to pass to mongodump command
CRON_TIME       the interval of cron job to run mongodump. `0 0 * * *` by default, which is every day at 00:00
MAX_BACKUPS     the number of backups to keep. When reaching the limit, the old backup will be discarded. No limit, by default
INIT_BACKUP     if set, create a backup when the container launched

⁠backup
-v host/dir:/backup

Tag summary

Content type

Image

Digest

Size

98.3 MB

Last updated

about 7 years ago

docker pull redream/mongo-backup