[clue] Recursive directory merge

Jason Friedman jason at powerpull.net
Thu Oct 13 21:22:54 MDT 2011


We have two hosts, one in Denver and one in New York, that will serve
as disaster-recovery hosts for each other.  /etc, /bin, /opt etc. are
already accounted for.  Synchronization needs to occur daily.  Change
volume will be about 10Gb per day.

Each host has a /data directory with "meshed" subdirectories.  For
example, in Denver we have:

/data/A/B/file1
/data/A/B/file2
/data/A/D/file1
/data/M/file1
/data/M/N/file1

In New York we have

/data/A/C/file1
/data/A/E/file1
/data/A/E/file2
/data/M/R/file1

So, there is no actual conflict between any full path between the two
machines.  Using rsync or some other technology, what is the best way
to synchronize the /data directory?

To make things more tricky, imagine that on day one file
/data/A/D/file1 is sent from Denver to New York.  On day two that file
is deleted from Denver, meaning on the next cycle that file needs to
be deleted from New York, also.


More information about the clue mailing list