dump
mongodump --db test
tar -Jcvf test.txz dump
rm -rf dump
restore
rm -rf ~/dump/test # 前のテストデータあれば削除
cd
tar Jxvf test.txz
mongorestore -d test dump/test --drop
More than 5 years have passed since last update.
dump
mongodump --db test
tar -Jcvf test.txz dump
rm -rf dump
restore
rm -rf ~/dump/test # 前のテストデータあれば削除
cd
tar Jxvf test.txz
mongorestore -d test dump/test --drop
Register as a new user and use Qiita more conveniently