Last active
December 25, 2015 13:29
-
-
Save kgorman/6984045 to your computer and use it in GitHub Desktop.
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
# Export/Import using named pipe | |
# Doesn't use disk I/O, just pipes input through pipes | |
# | |
# Node 1 | Terminal A | |
# | |
mkfifo /tmp/mongodump_pipe | |
# now export the data | |
/opt/mongodb/bin/mongoexport --host=localhost:99999 --collection=lotsodata --username=xxxx --password=yyyy --db=testdb > /tmp/mongodump_pipe | |
# Node 1 | Terminal B | |
# import the data | |
cat /tmp/mongodump_pipe | /opt/mongodb/bin/mongoimport --host=localhost:99991 --db=testdb_dumped --username=xxx --password=yyy --collection=lotsodata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment