Skip to content

Instantly share code, notes, and snippets.

@noxqsgit
Last active December 13, 2015 19:09
Show Gist options
  • Save noxqsgit/4960792 to your computer and use it in GitHub Desktop.
Save noxqsgit/4960792 to your computer and use it in GitHub Desktop.
mongo dump/restore
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