February 6, 2015 · MongoDB

MongoDB dump and restore

Dump the database:

$ mongodump

Compress the file:

$ tar -zcvf auxiliaresdemadrid.tar.gz auxiliaresdemadrid

Uncompress the tar.gz file:

$ tar -xvzf auxiliaresdemadrid.tar.gz

Restore de backup:

$ mongorestore --db auxiliaresdemadrid auxiliaresdemadrid/
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus