File Replication
Jim McKinstry
Today, it's a given that UNIX systems need to share data across
a network. A less common requirement is to have copies of data on
multiple servers. The most common solution for sharing data is NFS.
However, there is no widely accepted way to provide copies of data
across the network. One possible solution is to replicate the data
periodically to meet your needs.
While NFS provides current, real-time access to data on another
server, replicated data will lag behind the original by minutes or
hours. This is not a problem since replicated data is usually not
used for real-time processing. Combined with Replication Server
from Sybase, I have seen file replication provide an effective way
to off-load defect correction tasks and report generation to a
non-production server allowing the production server to run more
efficiently. File replication is also ideal for off-loading
production data that has been archived. Most importantly, critical
system configuration files (vfstab, crontab, volume
configuration, etc.) can be replicated to other servers so that the
information is recoverable in case of a failure.
Originally, this file replication solution was written in C and
used pipes. An associate hacked the solution out of a book and
tweaked it to work on our systems. When it stopped working, I was
asked to fix the problem. After a couple of days of debugging, I
decided to rewrite the solution so that people with minimal coding
experience would be able to maintain it. This version of the
software has been running successfully in a production shop for
more than 6 months and should be very easy to maintain. It is much
less complex, much more reliable, and actually faster than the
original C implementation.
|