beorsync – Sync files between two servers in an HA configuration.


beorsync syncfiles


beorsync is a perl script used to synchronize individual files and the contents of entire directories between master nodes in a High Availability master node failover environment.

The script has one required argument: syncfiles, which is the name of a file containing a list of files and directories to be synchronized.

beorsync expects to execute on the passive master node of a passive-active pair. Both the source and target nodes must be running heartbeat. The script pulls only those files that have changed on the active master node.

Diagnostic messages are logged to /var/log/beorsync.log.


If beorsync is invoked on the active master node, then the script exits with an error message.


A typical syncfiles contains the following list of files and directories to be synchronized:


Commonly, a cron job should be set up that periodically executes the beorsync script. For example, the following cron entry executes the script every 5 minutes, syncing all of the files and directories listed in the syncfiles file named /etc/beowulf/beorsyncfiles:

*/5 * * * * beorsync /etc/beowulf/beorsyncfiles