Backup mongodb
Backup users (all users, not just for IMS).
mongodump --db admin --out ./backup/adminMake a dump of the databases of the IMS. For each database, perform the operation as below, inserting the name of the database in place of $dbname:
mongodump --db $db-name --out ./backup/backup-$db-nameRestore
Restore the databases of the IMS. For each database, perform the operation as follows, inserting the name of the given database in place of $dbname
mongorestore --db $db-name ./backup/backup-$db-nameRecreate the users (all users, not just for IMS).
mongorestore --db admin ./backup/admin