Anaconda Enterprise Repository
It is always a great idea to backup you database. You can use the backup/restore methods when upgrading your operating system, moving MongoDB to another node, recovery, or scaling out your installation for redundancy. General information for for the commands can be found on the MongoDB website found here https://docs.mongodb.com/v2.6/tutorial/backup-with-mongodump/. Below is a description that applies to AE Repository specifically.
The databases used for Repo are named binstar and dev. You can see the databases by running the following commands:
If the only databases you have are the binstar databases and the built in MonogDB databases(admin and local)you can simply back up all of the databases.
This will result in a directory named dump/ that contains subdirectories of all the database names. You can change the output directory's name with the following:
mongodump --out repodb_backup
If you have many services using MongoDB and only want to back up the databases that AE Repo uses you can specify the database to back up as follows using the "-d" flag. Each databases specified will be backed up into the dump/ directory.
mongodump -d binstar
mongodump -d dev
Restoring is very simple. Just specify the directory name that contains all of the database backups. As in the examples this is called dump/