Start your mongodb server with automatic restore from S3 at startup and backup to S3
Prerequisites : Dont't forget to configure your environment variables in docker-compose.yaml
DATABASESName of the databases to backup/restore (format:<db_name>@s3://<file_on_s3>ORDATABASE_FILEJSON file that dontains the database definition on s3 (format:s3://<file_on_s3>- see example filedbs.json)AWS_ACCESS_KEY_IDYour AWS Access Key IDAWS_SECRET_ACCESS_KEYYour AWS Secret KeyINTERVALBackup interval in second (default: 300 - 5 minutes)
Simply run docker-compose up, your mongodb server will start as well as the backup and restore service
- Restore :
docker-compose exec backup sh /restore.sh <database_name> - Backup :
docker-compose exec backup sh /backup.sh <database_name>