beorsync – Sync files between two servers in an HA configuration.
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
If beorsync is invoked on the active master node, then the script exits with an error message.
syncfiles contains the following list of files and directories
to be synchronized:
/etc/hosts /etc/resolv.conf /etc/ntp.conf /root/bin/ /var/spool/cron/ /etc/beowulf/ /etc/passwd /etc/shadow /etc/group /etc/nsswitch.conf /etc/exports /etc/services /etc/ha.d/haresources /var/spool/torque/mom_priv/config /var/spool/torque/server_priv/jobs/ /var/spool/torque/server_priv/serverdb
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
*/5 * * * * beorsync /etc/beowulf/beorsyncfiles