文档数据库服务 DDS-恢复dds mongos节点

时间:2024-10-21 09:04:58

恢复dds mongos节点

  1. 准备dds mongos节点的配置文件和目录。

    rm -rf /compile/cluster-restore/mgs*

    mkdir -p /compile/cluster-restore/mgs1/log

    mkdir -p /compile/cluster-restore/mgs2/log

  2. 配置文件(restoreconfig/mongos_40301.yaml)。

    net:
      bindIp: 127.0.0.1 
      port: 40301
      unixDomainSocket: {enabled: false}
    processManagement: {fork: true, pidFilePath: /compile/cluster-restore/mgs1/mongos.pid}
    sharding: {configDB: 'config/127.0.0.1:40303,127.0.0.1:40304,127.0.0.1:40305'}
    systemLog: {destination: file, logAppend: true, logRotate: reopen, path: /compile/cluster-restore/mgs1/log/mongos.log}

  3. 配置文件(restoreconfig/mongos_40302.yaml)。

    net:
      bindIp: 127.0.0.1 
      port: 40302
      unixDomainSocket: {enabled: false}
    processManagement: {fork: true, pidFilePath: /compile/cluster-restore/mgs2/mongos.pid}
    sharding: {configDB: 'config/127.0.0.1:40303,127.0.0.1:40304,127.0.0.1:40305'}
    systemLog: {destination: file, logAppend: true, logRotate: reopen, path: /compile/cluster-restore/mgs2/log/mongos.log}

  4. 启动mongo节点。

    ./mongos -f restoreconfig/mongos_40301.yaml

    ./mongos -f restoreconfig/mongos_40302.yaml

support.huaweicloud.com/usermanual-dds/dds_03_0086.html