Configuring Scheduled Synchronization

Configure the synchronization task to run every minute using cron:

  1. Open the crontab file:
    # crontab -e
  2. Add the following line to the file to schedule the synchronization task to run every minute:
    * * * * * /usr/local/sbin/csync2 -x
  3. Save the file.
Create a script to immediately sync the configuration files when any configuration file is updated:
  1. Create the script file:
    # vi /etc/xiraid/config_update_handler.sh
  2. Paste the following content into the file:
    #!/usr/bin/bash
    /usr/local/sbin/csync2 -xv
    Tip:

    If necessary, update the path to csync2 in the script.

  3. Make the script executable:
    # chmod +x /etc/xiraid/config_update_handler.sh