> I'm using rsync to update my local database snapshot from a remote pooled
> mirror server. The trouble is that the servers in the pool are sometimes
> out of date, so I only want to update when the files are newer than the
> local copies to avoid unnecessary I/O..
> ...
I've found a workaround by using hard links. Instead of:
cp -r <current> <new>
rsync --update, <mirror> <new>
mv <new> <current>
I now:
mkdir <new>
ln -f <current>/* <new>
rsync --update, <mirror> <new>
if [ <new>.<stuff> -nt <current>.<stuff> ]
then mv <current> <old> ; mv <new> <current>
else rm -r <new>
fi
Since the files in <new> are the same as in <current>, --update does its job
properly.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html