Updated on 2023-05-29 GMT+08:00

Performing Synchronization

Prerequisites

The two servers can communicate with each other using SSH.

Procedure

  1. After modifying the configuration file, run the following command on source node 1:

    cd /opt/huawei/DirSyncScript

    sh sync.sh

    After this command is executed, the environment is initialized. After the environment is ready, the synchronization will be started.

    In addition to the script execution, the sh sync.sh command has the following functions:

    • sh sync.sh init for environment initialization, checking whether Inotify has been installed. If no, it will be installed.
    • sh sync.sh check for environment check, checking whether the modification file is correct and whether the required software has been installed to determine whether the synchronization can be started.
    • sh sync.sh start for starting the synchronization when the environment is ready. A synchronization process will be generated for each directory to be synchronized.
    • sh sync.sh stop for stopping the synchronization process

  2. Verifying the synchronization result.

    Log in to node 2 and check whether the synchronized files are the same as those on the source server.