Skip to content

BackupTools/mongo-backup-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB 4.0 S3 docker/kubernetes backup

Build status Pulls

Docker image to backup MongoDB 4.0 to S3 using mongodump and compress using pigz.

Advantages/features

  • Supports custom S3 endpoints (e.g. minio)
  • Uses piping instead of tmp file
  • Compression is done with pigz (parallel gzip)
  • Creates bucket if it's not created
  • Can be run in Kubernetes or Docker
  • PGP encryption
  • TODO: Add other compression methods
  • TODO: Add other dbs (e.g. postgres, mysql)

Configuration

S3_BUCK=mongo1-backups
S3_NAME=folder-name/backup-name-prefix
S3_URI=https://s3-key:s3-secret@s3.host.tld
MONGO_URI=mongodb://mongo-host:27017/db-name
GPG_KEYSERVER=keyserver.ubuntu.com # your hpks keyserver
GPG_KEYID=<key_id> # recipient key, backup will be encrypted if added

Or see docker-compose.yml file to run this container with Docker.

Cron backup with kubernetes

See kubernetes.cronjob.yml file.

About

Mongo backup container for kubernetes and docker with custom s3 endpoint ability (e.g. minio, ceph)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors