首页 > 数据库技术 > 详细

mongodb导出导入

时间:2021-09-17 14:43:49      阅读:23      评论:0      收藏:0      [点我收藏+]

[root@mysql books]# mongorestore   -h  172.31.17.90:27017  --drop   -d  books    --directoryperdb   /data/ifly_temp/books

恢复

备份
  mongodump  -h  172.18.21.52  -d books  -o  /home/
  mongodump  -h  172.18.21.52  -d resources  -o  /home/
 mongodump  -h  172.18.21.52  -d categories  -o  /home/

 ./mongodump -h 172.16.46.12  -d books  -o /data/ifly_backup/

    ./mongodump -h 172.16.46.12  -d resources  -o /data/ifly_backup/

 

bg   后台执行

-bash: bg: job 1 already in background
[root@mysql2 bin]# 2017-07-20T18:17:47.185+0800   Progress: 64380093118/144979209691 44% (bytes)
2017-07-20T18:17:50.374+0800   Progress: 64391643380/144979209691 44% (bytes)
2017-07-20T18:17:53.070+0800   Progress: 64395428591/144979209691 44% (bytes)
fg  后台转前台
./mongorestore -h 172.16.128.231 --port 27017 -d resources --directoryperdb /ziyuan/ah_hb_resource/mongobak20170708/resources/
2017-07-20T18:17:58.138+0800   Progress: 64396308782/144979209691 44% (bytes)
2017-07-20T18:18:01.177+0800   Progress: 64399344764/144979209691 44% (bytes)
2017-07-20T18:18:04.014+0800   Progress: 64414049516/144979209691 44% (bytes)
2017-07-20T18:18:07.054+0800   Progress: 64423828671/144979209691 44% (bytes)
2017-07-20T18:18:10.546+0800   Progress: 64438145393/144979209691 44% (bytes)
2017-07-20T18:18:13.008+0800   Progress: 64447946426/144979209691 44% (bytes)
2017-07-20T18:18:16.211+0800   Progress: 64459557918/144979209691 44% (bytes)
2017-07-20T18:18:19.219+0800   Progress: 64470423175/144979209691 44% (bytes)
2017-07-20T18:18:22.031+0800   Progress: 64480027362/144979209691 44% (bytes)
2017-07-20T18:18:28.776+0800   Progress: 64490600634/144979209691 44% (bytes)
2017-07-20T18:18:31.182+0800   Progress: 64500788206/144979209691 44% (bytes)
^Z  (ctrl+z)  停止任务
[1]+  Stopped                 ./mongorestore -h 172.16.128.231 --port 27017 -d resources --directoryperdb /ziyuan/ah_hb_resource/mongobak20170708/resources/

mongodb导出导入

原文:https://www.cnblogs.com/vzhangxk/p/15303318.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!