# Environment preparation on CentOS 7.7
$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
$ systemctl stop firewalld && systemctl disable firewalld
$ sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
$ reboot
$ getenforce
Disabled
Deployment Steps
- Configure sersync + rsync service on source machine
- Download sersync binary package:
$ wget https://sersync.googlecode.com/files/sersync2.5.4_64bit_binary_stable_final.tar.gz
- Extract downloaded archive:
$ tar -zxvf sersync2.5.4_64bit_binary_stable_final.tar.gz
GNU-Linux-x86/
GNU-Linux-x86/sersync2
GNU-Linux-x86/confxml.xml
$ mv GNU-Linux-x86/ sersync2.5.4
- Modify configuration file
/root/sersync2.5.4/confxml.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
<hostid>localhost</hostid>
<local base="/path/to/source/data/">
<filter start="false">
<exclude expression=".*\.tmp"/>
</filter>
<inotify>
<delete start="true"/>
<createFolder start="true"/>
<createFile start="false"/>
<closeWrite start="true"/>
<moveFrom start="true"/>
<moveTo start="true"/>
<attrib start="false"/>
<modify start="false"/>
</inotify>
</local>
<remote base="/path/to/destination/data/">
<rsync>
<commonParams>--archive --delete</commonParams>
<auth start="false"/>
<userDefinedPort start="false" port="874"/>
<timeout start="false" time="100"/>
<ssh start="false"/>
</rsync>
<staticBackup>
<enabled start="false"/>
</staticBackup>
</remote>
</head>
- Launch synchronization process:
$ cd /root/sersync2.5.4
$ ./sersync2 -r -d -o confxml.xml