Skip to content

Instantly share code, notes, and snippets.

@veelenga
Last active December 25, 2015 15:14
Show Gist options
  • Save veelenga/1d65c936a9abf8c7cc54 to your computer and use it in GitHub Desktop.
Save veelenga/1d65c936a9abf8c7cc54 to your computer and use it in GitHub Desktop.
MongoDB export/import database
# create dump of the database on remote server
$ mongodump --host remote_host --db database_name
# import into database on localhost
$ mongorestore --host localhost --dir dump/database_name/ --db database_name --drop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment