Last active
December 25, 2015 15:14
-
-
Save veelenga/1d65c936a9abf8c7cc54 to your computer and use it in GitHub Desktop.
MongoDB export/import database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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