Last active
November 29, 2018 08:53
-
-
Save shabin-slr/6ecb73a6d8334edf96dce246afefec32 to your computer and use it in GitHub Desktop.
Mongo Dump/Restore Commands
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
Mongo Dump | |
---------- | |
mongodump --host <HOST> --port <PORT> -d <DB NAME> --username <USERNAME> --password <PASSWORD> --out <PATH TO DUMP TO eg ./> --gzip | |
Mongo Restore | |
------------- | |
mongorestore -d <DESTINATION DB NAME> --host <HOST> --port <PORT> --username <USERNAME> --password <PASSWORD> <PATH TO DUMP FOLDER eg ./dump/$DBNAME> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment