Centos7.x Rsync + sersync for real-time incremental data synchronization backup tutorial, rsyncsersync
I. Overview
1. sersync is developed based on Inotify and is similar to Inotify-tools.
2. sersync can record changes (including adding, deleting, and modifying) in the monitored directory to the name of a specific file or directory. When rsync is used, only the changed file or directory will be synchronized.
2. Comparison between Rsync + Inotify-tools and Rsync + sersync
1. Rsync + Inotify-tools
(1) Inotify-tools can only record changes (including adding, deleting, and modifying) to the monitored directories ), no specific file or directory changes have been recorded;
(2): During rsync, you do not know which file or directory has changed. The entire directory is synchronized each time. When the data volume is large, the entire directory synchronization is very time-consuming (rsync needs to traverse the entire directory to find the comparison file), so the efficiency is very low.
2. Rsync + sersync
(1) sersync can record the name of a specific file or directory that has changed (including adding, deleting, and modifying) in the monitored directory;
(2): During rsync, only the file or directory that has changed will be synchronized (the data changed each time is relatively small compared to the data in the entire synchronization directory, rsync is fast when searching and comparing files. Therefore, it is highly efficient.
Summary: when the amount of data in the synchronized directory is small, we recommend that you use Rsync + Inotify-tools. When the data volume is large (several hundred GB or even 1 Tb) and there are many files, we recommend that you use Rsync + sersync.