Versions Compared

Key

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

...

  use mongodump and mongorestore for small deployment.  They create
  and use BSON files to do dump and restore. We followed and succeeded.
 

  On the machine where Tool Catalog is running, do:
      mongodump --db tool_catalog -o <path and folder to dump to>
  This created creates a directory named "dump/" in the current directory, and dumped dumps the
  "tool_catalog" db database into it.

  To restore, copy the "dump/" directory to the target machine. On it, first make sure that

   mongod is running, then go . Go to "dump/"'s   parent directory, then do:
      mongorestore --drop --db tool_catalog <path and folder where tool_catalog dump is>

   the flag --drop will drop any existing data, --db will tell mongorestore what database to restore

  And it will restore it into with the current running mongod database.
      mongo
   > show dbs
  now shows the "tool_catalog" directory.