注意
本地目錄、配(pei)置(zhi)(zhi)文件(jian)和(he)配(pei)置(zhi)(zhi)信(xin)息非(fei)固定,可(ke)由用(yong)戶自定義。
以如下2個shardsvr的集群實例(li)的備份文件(jian)舉(ju)例(li)(實例(li)ID:cac1efc8e65e42ecad8953352321bfeein02)
- configsvr節點備份文件解壓目錄:/compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_41c8a32fb10245899708dea453a8c5c9no02
- shardsvr1節點備份文件解壓目錄:/compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_6cfa6167d4114d7c8cec5b47f9a78dc5no02
- shardsvr2節點備份文件解壓目錄:/compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_92b196d2401041a7af869a2a3cab7079no02
configsvr的三個節點的數據目錄和日志目錄
/compile/cluster-restore/cfg1/data/db
/compile/cluster-restore/cfg1/log
/compile/cluster-restore/cfg2/data/db
/compile/cluster-restore/cfg2/log
/compile/cluster-restore/cfg3/data/db
/compile/cluster-restore/cfg3/log
shardsvr1的三個節點的數據目錄和日志目錄
/compile/cluster-restore/shd11/data/db
/compile/cluster-restore/shd11/log
/compile/cluster-restore/shd12/data/db
/compile/cluster-restore/shd12/log
/compile/cluster-restore/shd13/data/db
/compile/cluster-restore/shd13/log
shardsvr2的三個節點的數據目錄和日志目錄
/compile/cluster-restore/shd21/data/db
/compile/cluster-restore/shd21/log
/compile/cluster-restore/shd22/data/db
/compile/cluster-restore/shd22/log
/compile/cluster-restore/shd23/data/db
/compile/cluster-restore/shd23/log
mongos節點的日志目錄
/compile/cluster-restore/mgs1/log
/compile/cluster-restore/mgs2/log
IP地址和端口信息說明
進(jin)程綁定的IP地址為(wei)127.0.0.1,端口號(hao)分配(pei)如(ru)下。
-
mongos節點:40301, 40302
-
configsvr節(jie)點:40303, 40304, 40305
-
shardsvr1節點(dian):40306, 40307, 40308
-
shardsvr2節點:40309, 40310, 40311
配置文件說明
- configsvr副本集的單節點配置文件及三個節點的配置文件
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/single_40303.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/configsvr_40303.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/configsvr_40304.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/configsvr_40305.yaml
- shardsvr1副本集的單節點配置文件及三個節點的配置文件
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/single_40306.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40306.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40307.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40308.yaml
- shardsvr2副本集的單節點配置文件及三個節點的配置文件
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/single_40309.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40309.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40310.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/shardsvr_40311.yaml
- mongos節點的配置文件
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40301.yaml
- /compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40302.yaml
恢復步驟
命(ming)令(ling)運行目錄(lu):/compile/mongodb/mongodb-src-4.0.3