MongoDB:导入导出:修订间差异

来自WHY42
imported>Soleverlee
(创建页面,内容为“MongoDB的数据导入导出操作: <source lang="bash"> mongoexport -d jian-mmdb -c posts -o jian.db.json --type json scp -i ~/.ssh/xx.pem jian-db.json ec2-user@x...”)
 
imported>Riguz
无编辑摘要
第5行: 第5行:
mongoimport -d jian-mmdb -c posts --file jian.json --type json
mongoimport -d jian-mmdb -c posts --file jian.json --type json
</source>
</source>
[[Image:mongo_export.png|600px]]
[[Category:Linux/Unix]]
[[Category:Linux/Unix]]

2018年8月14日 (二) 06:41的版本

MongoDB的数据导入导出操作:

mongoexport -d jian-mmdb -c posts -o jian.db.json --type json
scp -i ~/.ssh/xx.pem jian-db.json ec2-user@xx.com:/home/ec2-user/jian.json
mongoimport -d jian-mmdb -c posts --file jian.json --type json