[GLLUG] syncing files

T Menezes tm.onthemove at gmail.com
Tue Nov 25 13:34:33 UTC 2014

Hi Andy,

(the original message was sent truncated when I accidentally pressed
'Enter' - sorry)

Thanks for the feedback.

I'm trying to mirror a CVS vault between two hosts (one way only).

I have been thinking further about it:

1. cron job at local/master host
    a. freeze the CVS vault
    b. copy a subset of the vault (which is why I need to use
--files-from) to a local, staging directory
    c. unfreeze the CVS vault

2. cron job at the local/master host
    a. in mirrored/remote host, over ssh,delete any previous flags &
create temporary file to flag start of sync
    b. rsync (over ssh) the local copy (all files) from the staging
directory to a staging directory in the mirrored/remote host - a push
    (possible n re-tries before collapsing)
    c. in mirrored/remote host, over ssh, delete start flag & create
temporary file to flag completion of sync

3. cron job at the mirrored/remote host
    a. look for completion flag - stop if it's not there
    b. freeze the CVS vault
    c. copy (rsync) local files from staging directory to local CVS vault
    d. unfreeze the CVS vault
    e. delete sync-completion flag

(I'll use dedicated SSH keys throughout)

Doing it like so means that the transfer of data between fixed temp
locations in the two hosts, not only requires no CVS-specific
knowledge (a good thing on its own), but is also isolated from any
operations on either CVS vault.

Does this make sense?


More information about the GLLUG mailing list