Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.24 KB

README.md

File metadata and controls

44 lines (36 loc) · 1.24 KB

database-s3-backup

Docker Image that takes care of MongoDB, PostgreSQL and MySQL Backups. Creates a dump with compression and encryption support and uploads it to an S3 compatible endpoint.

Usage

Mongo Backup

  docker run -it \
      -e AWS_ACCESS_KEY_ID=ID \
      -e AWS_SECRET_ACCESS_KEY=KEY \
      -e BUCKET_NAME=backups \
      -e BACKUP_NAME=backup \
      -e ENCRYPTION_KEY=your_secret_passphrase
      -e DATABASE_URL=mongodb://user:password@host:port/database?replicaSet=rs0&authSource=authDatabase
      ghcr.io/alexanderbabel/database-s3-backup

Postgresql Backup

  docker run -it \
      -e AWS_ACCESS_KEY_ID=ID \
      -e AWS_SECRET_ACCESS_KEY=KEY \
      -e BUCKET_NAME=backups \
      -e BACKUP_NAME=backup \
      -e ENCRYPTION_KEY=your_secret_passphrase
      -e DATABASE_URL=postgresql://user:password@host:port/database
      ghcr.io/alexanderbabel/database-s3-backup

MySQL Backup

  docker run -it \
      -e AWS_ACCESS_KEY_ID=ID \
      -e AWS_SECRET_ACCESS_KEY=KEY \
      -e BUCKET_NAME=backups \
      -e BACKUP_NAME=backup \
      -e ENCRYPTION_KEY=your_secret_passphrase
      -e DATABASE_URL=mysql://user:password@host:port/database
      ghcr.io/alexanderbabel/database-s3-backup