江湖救急,冷备数据恢复 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sadfQED2
V2EX    MongoDB

江湖救急,冷备数据恢复

  •  
  •   sadfQED2 2023-11-28 17:23:49 +08:00 2930 次点击
    这是一个创建于 681 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有一份 4 年前的 Mongodb 冷备数据,现在需要恢复出来使用。4 年前留下的是一个 tar 格式的文件,19G 大小,预览文件内容是这样的:

    mongodb/ mongodb/WiredTiger.lock mongodb/index-3--2162478702715552952.wt mongodb/diagnostic.data/ mongodb/diagnostic.data/metrics.2019-11-12T20-37-31Z-00000 mongodb/diagnostic.data/metrics.2019-12-03T12-08-23Z-00000 mongodb/diagnostic.data/metrics.2019-11-26T13-42-24Z-00000 mongodb/diagnostic.data/metrics.2019-12-05T17-38-23Z-00000 mongodb/diagnostic.data/metrics.2019-11-15T02-22-31Z-00000 mongodb/diagnostic.data/metrics.2019-12-01T03-58-23Z-00000 mongodb/diagnostic.data/metrics.2019-11-04T12-04-09Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-32-45Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-22-27Z-00000 mongodb/diagnostic.data/metrics.2019-11-20T17-17-16Z-00000 mongodb/diagnostic.data/metrics.2019-11-08T14-42-31Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-27-58Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-33-52Z-00000 mongodb/diagnostic.data/metrics.2019-11-10T20-37-31Z-00000 mongodb/diagnostic.data/metrics.2019-11-23T05-48-39Z-00000 mongodb/diagnostic.data/metrics.2019-11-22T23-37-16Z-00000 mongodb/diagnostic.data/metrics.2019-11-04T10-51-02Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-37-15Z-00000 mongodb/diagnostic.data/metrics.2019-11-06T09-32-31Z-00000 mongodb/diagnostic.data/metrics.2019-12-10T06-10-22Z-00000 mongodb/diagnostic.data/metrics.2019-11-18T12-06-17Z-00000 mongodb/diagnostic.data/metrics.2019-12-07T23-00-22Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-24-19Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-26-23Z-00000 mongodb/diagnostic.data/metrics.2019-11-28T20-58-23Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T10-08-45Z-00000 mongodb/diagnostic.data/metrics.2019-11-03T09-39-15Z-00000 mongodb/_mdb_catalog.wt mongodb/collection-0--2162478702715552952.wt mongodb/collection-4--6287796740362363623.wt mongodb/index-5--2162478702715552952.wt mongodb/journal/ mongodb/journal/WiredTigerPreplog.0000000001 mongodb/journal/WiredTigerPreplog.0000000002 mongodb/journal/WiredTigerLog.0000000434 mongodb/WiredTiger.wt mongodb/collection-2--4216008088303394775.wt mongodb/WiredTigerLAS.wt mongodb/WiredTiger.turtle mongodb/index-6--6287796740362363623.wt mongodb/index-4--2162478702715552952.wt mongodb/collection-2--6287796740362363623.wt mongodb/index-3--6287796740362363623.wt mongodb/index-1--2162478702715552952.wt mongodb/index-1--4216008088303394775.wt mongodb/collection-0--4216008088303394775.wt mongodb/mongod.lock mongodb/WiredTiger mongodb/collection-0--6287796740362363623.wt mongodb/index-4--4216008088303394775.wt mongodb/storage.bson mongodb/sizeStorer.wt mongodb/index-2--2162478702715552952.wt mongodb/index-3--4216008088303394775.wt mongodb/index-1--6287796740362363623.wt mongodb/index-5--6287796740362363623.wt 

    有没有熟悉 mogodb 的大佬看一眼,这究竟是啥备份数据呀,怎么恢复呀,我用 MongoDB 自带的导入命令尝试,始终说格式不对。我从最新的 7.0.4 版本,一路试到 3.0 版本,全部说格式不对。难不成这个是什么第三方工具导出的数据?

    killva4624
        1
    killva4624  
       2023-11-28 17:33:54 +08:00
    这个是冷备文件,不是逻辑文件吧...你应该用这个冷备文件去直接启动一个 mongod

    https://www.mongodb.com/docs/manual/tutorial/manage-mongodb-processes/#specify-a-data-directory
    sadfQED2
        2
    sadfQED2  
    OP
       2023-11-28 17:44:43 +08:00 via Android
    @killva4624 哦,我靠,脑子短路了,没想到。感谢大佬,给大佬磕头
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2825 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 27ms UTC 13:35 PVG 21:35 LAX 06:35 JFK 09:35
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86