Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

An example of running a simple mongodb backup service as a cron job in a docker container.

Copy example.env to .env.

cp example.env .env

Replace with a real credentials.

MONGODB_DATABASE=mongo
MONGODB_HOST=127.0.0.1
MONGODB_PORT=27017
MONGODB_USERNAME=root
MONGODB_PASSWORD=password
MONGODB_AUTH_DATABASE=admin
CRON_EXPRESSION=0 * * * *
LOCAL_PATH=/var/mongo/backups
DESTINATION_PATH=/var/mongo/backups

Check the https://crontab.guru to find more crontab expressions.

docker-compose build

docker-compose up -d

About

An example of running a simple mongodb backup service as a cron job in a docker container.

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages