Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you want to dump all collections in one go, simply omit the "-c somecollection" argument in the invocation below.

Code Block
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c customapps -o .

Once you know it is working, dump some more collections; the endpoints one in testing took a little while.

Code Block
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c sites -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c reportConfig -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c reportData -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c sumCache -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c command_outputs -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c command_output_log -o .
/usr/local/mongodb/bin/mongodump -h kaos -d nmis -c endpoints -o .

...

To restore specific collections, run the following from the folder where the dumped BSON files are located:

Code Block
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c customapps customapps.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c sites sites.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c reportConfig reportConfig.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c reportData reportData.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c sumCache sumCache.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c command_outputs command_outputs.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c command_output_log command_output_log.bson
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis -c endpoints endpoints.bson

...

Code Block
/usr/local/mongodb/bin/mongorestore -u opUserRW -p op42flow42 -d nmis .

...


Verify the Collections Exist

...