Updated on 2022-09-16 GMT+08:00

Directories and Configurations

The local directory, configuration file, and configuration information are not fixed and can be customized.

The following uses backup files of two shardsvr cluster instances as an example (instance ID: cac1efc8e65e42ecad8953352321bfeein02).

  • Directory of the decompressed backup files of the configsvr node: /compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_41c8a32fb10245899708dea453a8c5c9no02
  • Directory of the decompressed backup files of the shardsvr1 node:

    /compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_6cfa6167d4114d7c8cec5b47f9a78dc5no02

  • Directory of the decompressed backup files of the shardsvr2 node:

    /compile/download/backups/cac1efc8e65e42ecad8953352321bfeein02_92b196d2401041a7af869a2a3cab7079no02

Data directories and log directories of the three configsvr nodes

/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

Data directories and log directories of the three nodes of 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

Data directories and log directories of the three nodes of 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

Log directories of the mongos node

/compile/cluster-restore/mgs1/log

/compile/cluster-restore/mgs2/log

IP Address and Port Information

The IP address bound to the process is 127.0.0.1. The port numbers are allocated as follows:

  • mongos node: 40301, 40302
  • configsvr node: 40303, 40304, 40305
  • shardsvr1: 40306, 40307, and 40308
  • shardsvr2: 40309, 40310, and 40311

Configuration file description

  • Configuration file of a single node and configuration files of three nodes in the configsvr replica set

    /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

  • Configuration file of a single node and configuration files of three nodes in the shardsvr1 replica set

    /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

  • Configuration file of a single node and configuration files of three nodes in the shardsvr2 replica set:

    /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

  • Configuration file of the mongos node:

    /compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40301.yaml

    /compile/mongodb/mongodb-src-4.0.3/restoreconfig/mongos_40302.yaml

Procedure

Command running directory: /compile/mongodb/mongodb-src-4.0.3