zoukankan      html  css  js  c++  java
  • mongodb备份恢复

    [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/

  • 相关阅读:
    对List进行子查询及分组
    网格数据库架构设计构想
    推荐一款简单实用的漏洞测试工具:Paros
    用友U9产品SOA设计架构遭技术质疑
    超简单使用MemCached
    不按常规出招
    如何学好AJax、求高手指点
    Begin
    SpringBoot基础
    SpringBoot基础学习(番外9.1)Spring MVC或Spring Boot配置默认访问页面不生效?
  • 原文地址:https://www.cnblogs.com/vzhangxk/p/15303318.html
Copyright © 2011-2022 走看看