Backups

To create and restore databases, follow the outlined steps

MongoDB

Create Backup

# ./scripts/backup-mongo.sh <backup filename prefix> <destinationfolder>

./scripts/backup-mongo.sh mongo backups/

Restore from Backup

# ./scripts/restore-mongo-backups.sh <Relative path to backup file>. 
# Expected structure inside backup folder mongo-xxx/access/
# info1-mngr@inforecover-exercises:~/backup/mongodump/access$ ls -l
# total 252256
# -rw-r--r-- 1 ... ... 258302988 Oct 23 18:28 studentSubmissions.bson
# -rw-r--r-- 1 ... ...       173 Oct 23 18:28 studentSubmissions.metadata.json

./scripts/backup-mongo.sh <backup filename prefix> <folder where to place backups

Postgres

Create Backup

Restore from Backup

circle-info

If no root access, do the following for the 'remove any database files' step:

Last updated

Was this helpful?