simple mongodb backup image to be run as cronjob / job. backs up mongodb to s3 bucket
2.0K
https://github.com/JustinGuese/docker-mongodb-backup-s3
simple mongodb backup image to be run as cronjob / job
dumps the contents of a mongodb database with mongodump to a file containing the current date (e.g. mongodbbackup-2022-12-12.gz), and uploads it to an s3 bucket.
If you want to run it manually, swap out the env variables with your values, and run the following:
docker run --rm -e MONGO_URI=mongodb://mongo:27017 -e AWS_ACCESS_KEY_ID=secret -e AWS_SECRET_ACCESS_KEY=secret -e S3_BUCKET=mongodb-backup-bucket -e S3_ENDPOINT=https://s3.amazonaws.com guestros/mongodb-backup-s3:latest
if you are running mongodb in a kubernetes cluster, you can schedule a backup cronjob.
kubectl create secret generic s3backuptarget --from-env-file=cloudcredskubectl apply -f kubernetes/mongodb-backup-cronjob.yamlContent type
Image
Digest
sha256:61728f5ce…
Size
85.1 MB
Last updated
over 3 years ago
docker pull guestros/mongodb-backup-s3