Skip to content

Instantly share code, notes, and snippets.

@obfusk
Forked from noxqsgit/mongo.bash
Created October 20, 2013 19:39
Show Gist options
  • Save obfusk/7074255 to your computer and use it in GitHub Desktop.
Save obfusk/7074255 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