Created
February 11, 2020 04:05
-
-
Save elfeffe/ee5dbd2b19e1f5f2a3760026b7cbef10 to your computer and use it in GitHub Desktop.
Move MongoDB collection to another server oneliner version
This file contains 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
mongodump -v --archive --uri="mongodb://localhost:27017/DB_NAME" | mongorestore -v --archive -d DB_NAME --nsFrom DB_NAME.* --nsTo DB_NAME.* --uri="mongodb://DEST_IP:27017/DB_NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment