目录及配置说明
本地目录、配置文件和配置信息非固定,可由用户自定义。
以如下2个shardsvr的集群实例的备份文件举例(实例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
dds mongos节点的日志目录
/compile/cluster-restore/mgs1/log
/compile/cluster-restore/mgs2/log
IP地址和端口信息说明
进程绑定的IP地址为127.0.0.1,端口号分配如下。
- dds mongos节点:40301, 40302
- configsvr节点:40303, 40304, 40305
- shardsvr1节点: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
- dds mongos节点的配置文件
/compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40301.yaml
/compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40302.yaml
恢复步骤
命令运行目录:/compile/mongodb/mongodb-src-4.0.3