[GLLUG] syncing files

Andy Smith andy at bitfolk.com
Tue Nov 25 12:22:29 UTC 2014

Hi TM,

On Tue, Nov 25, 2014 at 10:01:59AM +0000, T Menezes wrote:
> When I use a push operation, I am concerned about leaving the mirrored CVS
> vault in an inconsistent state if there is a problem with the comms.

Why are you only concerned about this when doing a push? i.e. Why do
you think a pull will be any less susceptible to this problem?

> I don't think I can use '--files-from' with a path on the remote
> (master) host.

Correct. If you're using --files-from then that file needs to be
local. Is there a particular reason why you need to use
--files-from? rsync is smart enough to work out by itself which
files have changed.

I'd execute the command from the host you have most control over.

rsync won't leave you with a partial sync of a given file as it
works on a temporary file before renaming that over the top of the
destination. A failed run can of course leave you with some files
synced and some not though.

If you got an error return code from rsync then you could run it
again, until it gives you a success. Won't help in the face of a
problem that won't fix itself though (e.g., disk full).

On the destination you could make a temporary copy of your file tree
using hardlinks (cp -al); this won't actually use any additional
space.  You could then rsync to that and flip trees over if and only
if the rsync gives you a success code.

If we knew what you're trying to achieve—the bigger picture beyond
"I need to sync some files"—then there may be a more appropriate

You may find csync more appropriate, for example.



http://bitfolk.com/ -- No-nonsense VPS hosting

More information about the GLLUG mailing list