banbanbai 发表于 2018-10-24 12:01:00

MongoDB CookBook读书笔记之备份与恢复

# mongorestore --host hdp05 --port 27017 --drop /root/admin-06-13-18/  2018-06-13T09:53:07.783+0800    preparing collections to restore from
  2018-06-13T09:53:07.834+0800    reading metadata for admin.temp from /root/admin-06-13-18/admin/temp.metadata.json
  2018-06-13T09:53:07.836+0800    reading metadata for admin.stdcodes from /root/admin-06-13-18/admin/stdcodes.metadata.json
  2018-06-13T09:53:07.858+0800    reading metadata for admin.temp_boss from /root/admin-06-13-18/admin/temp_boss.metadata.json
  2018-06-13T09:53:07.862+0800    reading metadata for admin.postalCodes from /root/admin-06-13-18/admin/postalCodes.metadata.json
  2018-06-13T09:53:07.880+0800    restoring admin.temp from /root/admin-06-13-18/admin/temp.bson
  2018-06-13T09:53:07.886+0800    restoring admin.stdcodes from /root/admin-06-13-18/admin/stdcodes.bson
  2018-06-13T09:53:07.895+0800    restoring admin.temp_boss from /root/admin-06-13-18/admin/temp_boss.bson
  2018-06-13T09:53:07.896+0800    restoring admin.postalCodes from /root/admin-06-13-18/admin/postalCodes.bson
  2018-06-13T09:53:08.020+0800    no indexes to restore
  2018-06-13T09:53:08.020+0800    finished restoring admin.stdcodes (2611 documents)
  2018-06-13T09:53:09.404+0800    restoring indexes for collection admin.postalCodes from metadata
  2018-06-13T09:53:09.683+0800    finished restoring admin.postalCodes (39734 documents)
  2018-06-13T09:53:10.776+0800    [........................]       admin.temp15.7MB/815MB(1.9%)
  2018-06-13T09:53:10.776+0800    [........................]admin.temp_boss21.8MB/629MB(3.5%)
  2018-06-13T09:53:10.777+0800
  2018-06-13T09:53:13.776+0800    [#.......................]       admin.temp40.6MB/815MB(5.0%)
  2018-06-13T09:53:13.777+0800    [##......................]admin.temp_boss56.9MB/629MB(9.0%)
  2018-06-13T09:53:13.777+0800
  2018-06-13T09:53:16.777+0800    [#.......................]       admin.temp62.3MB/815MB   (7.6%)
  2018-06-13T09:53:16.777+0800    [###.....................]admin.temp_boss88.0MB/629MB(14.0%)
  2018-06-13T09:53:16.777+0800
  2018-06-13T09:53:19.776+0800    [##......................]       admin.temp84.0MB/815MB(10.3%)
  2018-06-13T09:53:19.776+0800    [####....................]admin.temp_boss   118MB/629MB(18.8%)
  2018-06-13T09:53:19.776+0800
  2018-06-13T09:53:22.780+0800    [###.....................]       admin.temp110MB/815MB(13.5%)
  2018-06-13T09:53:22.780+0800    [#####...................]admin.temp_boss156MB/629MB(24.7%)
  2018-06-13T09:53:22.780+0800
  2018-06-13T09:53:25.776+0800    [###.....................]       admin.temp134MB/815MB(16.4%)
  2018-06-13T09:53:25.776+0800    [#######.................]admin.temp_boss191MB/629MB(30.3%)
  2018-06-13T09:53:25.776+0800
  2018-06-13T09:53:28.778+0800    [####....................]       admin.temp158MB/815MB(19.3%)
  2018-06-13T09:53:28.778+0800    [########................]admin.temp_boss225MB/629MB(35.7%)
  2018-06-13T09:53:28.778+0800
  2018-06-13T09:53:31.777+0800    [#####...................]       admin.temp182MB/815MB(22.3%)
  2018-06-13T09:53:31.777+0800    [#########...............]admin.temp_boss259MB/629MB(41.2%)
  2018-06-13T09:53:31.777+0800
  2018-06-13T09:53:34.777+0800    [######..................]       admin.temp209MB/815MB(25.7%)
  2018-06-13T09:53:34.777+0800    [###########.............]admin.temp_boss297MB/629MB(47.2%)
  2018-06-13T09:53:34.777+0800
  2018-06-13T09:53:37.777+0800    [######..................]       admin.temp230MB/815MB(28.3%)
  2018-06-13T09:53:37.777+0800    [############............]admin.temp_boss328MB/629MB(52.2%)
  2018-06-13T09:53:37.777+0800
  2018-06-13T09:53:40.777+0800    [#######.................]       admin.temp256MB/815MB(31.4%)
  2018-06-13T09:53:40.777+0800    [#############...........]admin.temp_boss364MB/629MB(57.9%)
  2018-06-13T09:53:40.777+0800
  2018-06-13T09:53:43.776+0800    [########................]       admin.temp281MB/815MB(34.5%)
  2018-06-13T09:53:43.776+0800    [###############.........]admin.temp_boss399MB/629MB(63.4%)
  2018-06-13T09:53:43.776+0800
  2018-06-13T09:53:46.777+0800    [########................]       admin.temp305MB/815MB(37.4%)
  2018-06-13T09:53:46.777+0800    [################........]admin.temp_boss433MB/629MB(68.9%)
  2018-06-13T09:53:46.777+0800
  2018-06-13T09:53:49.776+0800    [#########...............]       admin.temp328MB/815MB(40.2%)
  2018-06-13T09:53:49.776+0800    [#################.......]admin.temp_boss465MB/629MB(73.9%)
  2018-06-13T09:53:49.776+0800
  2018-06-13T09:53:52.776+0800    [##########..............]       admin.temp350MB/815MB(43.0%)
  2018-06-13T09:53:52.776+0800    [##################......]admin.temp_boss497MB/629MB(79.0%)
  2018-06-13T09:53:52.776+0800
  2018-06-13T09:53:55.776+0800    [###########.............]       admin.temp374MB/815MB(45.9%)
  2018-06-13T09:53:55.776+0800    [####################....]admin.temp_boss531MB/629MB(84.3%)
  2018-06-13T09:53:55.776+0800
  2018-06-13T09:53:58.776+0800    [###########.............]       admin.temp396MB/815MB(48.6%)
  2018-06-13T09:53:58.776+0800    [#####################...]admin.temp_boss561MB/629MB(89.2%)
  2018-06-13T09:53:58.776+0800
  2018-06-13T09:54:01.777+0800    [############............]       admin.temp420MB/815MB(51.6%)
  2018-06-13T09:54:01.777+0800    [######################..]admin.temp_boss596MB/629MB(94.8%)
  2018-06-13T09:54:01.777+0800
  2018-06-13T09:54:04.553+0800    [########################]admin.temp_boss629MB/629MB(100.0%)
  2018-06-13T09:54:04.553+0800    no indexes to restore
  2018-06-13T09:54:04.553+0800    finished restoring admin.temp_boss (1778416 documents)
  2018-06-13T09:54:04.776+0800    [#############...........]admin.temp444MB/815MB(54.5%)
  2018-06-13T09:54:07.776+0800    [##############..........]admin.temp478MB/815MB(58.7%)
  2018-06-13T09:54:10.776+0800    [###############.........]admin.temp511MB/815MB(62.6%)
  2018-06-13T09:54:13.776+0800    [###############.........]admin.temp537MB/815MB(65.9%)
  2018-06-13T09:54:16.776+0800    [################........]admin.temp569MB/815MB(69.8%)
  2018-06-13T09:54:19.776+0800    [#################.......]admin.temp597MB/815MB(73.2%)
  2018-06-13T09:54:22.776+0800    [##################......]admin.temp628MB/815MB(77.0%)
  2018-06-13T09:54:25.778+0800    [###################.....]admin.temp661MB/815MB(81.2%)
  2018-06-13T09:54:28.777+0800    [####################....]admin.temp691MB/815MB(84.8%)
  2018-06-13T09:54:31.777+0800    [#####################...]admin.temp724MB/815MB(88.9%)
  2018-06-13T09:54:34.776+0800    [######################..]admin.temp753MB/815MB(92.4%)
  2018-06-13T09:54:37.776+0800    [#######################.]admin.temp784MB/815MB(96.2%)
  2018-06-13T09:54:40.776+0800    [#######################.]admin.temp815MB/815MB(100.0%)
  2018-06-13T09:54:40.785+0800    [########################]admin.temp815MB/815MB(100.0%)
  2018-06-13T09:54:40.785+0800    no indexes to restore
  2018-06-13T09:54:40.785+0800    finished restoring admin.temp (3347522 documents)
  2018-06-13T09:54:40.786+0800    restoring users from /root/admin-06-13-18/admin/system.users.bson
  2018-06-13T09:54:40.825+0800    done
  # mongo
  MongoDB shell version v3.6.5
  connecting to: mongodb://127.0.0.1:27017
  MongoDB server version: 3.6.5
  switched to db admin
  > db.temp.count()
  3347522
  >

页: [1]
查看完整版本: MongoDB CookBook读书笔记之备份与恢复