Last active
December 13, 2015 19:09
-
-
Save noxqsgit/4960792 to your computer and use it in GitHub Desktop.
mongo dump/restore
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
ssh -Nv -L 8888:localhost:27017 user1@server1 | |
ssh -Nv -L 9999:localhost:27017 user2@server2 | |
mongodump -h localhost:8888 -d db1 -u user1 -p '' | |
mongorestore -h localhost:9999 -d db2 -u user2 -p '' dump/db1/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment