Mirroring cvs archives
jw schultz
jw at pegasys.ws
Tue Nov 4 11:29:38 EST 2003
On Mon, Nov 03, 2003 at 03:25:18PM -0800, Wayne Davison wrote:
> On Mon, Nov 03, 2003 at 02:02:50PM -0800, jw schultz wrote:
> > If full consistency is wanted there may be a file you can check before
> > and after the rsync to see if anything changed and then do a resync.
>
> Yeah, I was thinking that rsyncing the $CVSROOT/CVSROOT directory first
> (before transferring anything else) and then again at the end should
> tell you if something got committed during the transfer by noticing if
> the history file gets updated. If it has changed, rerun the sync of the
> non-CVSROOT dirs until the history file is finally quiescent.
Shouldn't need to break it up.
If the history file (or another single file) is enough:
Starthist=`ls -l $CVSROOT/CVSROOT/history`
curhist=""
while [ "$Starthist" != "$curhist" ]
do
rsync .....
curhist=`ls -l $CVSROOT/CVSROOT/history`
done
If not you can test the directory.
ls -l $CVSROOT/CVSROOT >$TMPFILE.start
touch $TMPFILE.test
until diff -q $TMPFILE.start $TMPFILE.test >/dev/null
do
rsync .....
ls -l $CVSROOT/CVSROOT >$TMPFILE.test
done
rm -f $TMPFILE.start $TMPFILE.test
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list