Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created March 24, 2015 13:44
Show Gist options
  • Save tkuchiki/cb8313ef33bbe9116185 to your computer and use it in GitHub Desktop.
Save tkuchiki/cb8313ef33bbe9116185 to your computer and use it in GitHub Desktop.
mongodb データ移行

server1

mongodump --db DBNAME --out  /tmp
rsync -av /tmp/DBNAME server2:/tmp/

server2

mongorestore --dbpath /var/lib/mongo --db DBNAME /tmp/DBNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment