How to sync an exact list of files, Including deletes!?

Axel Kittenberger axkibe at gmail.com
Tue Nov 23 15:37:48 MST 2010


And another case if the parent directory of the target also doesnt exist:

/usr/bin/rsync -r /tmp/ltest.Pkr/src//l/w/c/r/a/ /tmp/ltest.Pkr/trg//l/w/c/r/a/
rsync: change_dir "/tmp/ltest.Pkr/src//l/w/c/r/a" failed: No such file
or directory (2)
rsync: mkdir "/tmp/ltest.Pkr/trg//l/w/c/r/a" failed: No such file or
directory (2)
rsync error: error in file IO (code 11) at main.c(594) [receiver=3.0.3]
rsync: connection unexpectedly closed (96 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at
io.c(635) [sender=3.0.3]

So far I guessed exit code 12 from the text to be a network error and
to keep trying it again  - which I suppose isn't a good idea, since
this will never go trough until /tmp/ltest.Pkr/trg//l/w/c exists.

On Tue, Nov 23, 2010 at 11:32 PM, Axel Kittenberger <axkibe at gmail.com> wrote:
>> You want the --delete-missing-args option of the current development
>> rsync.
>
> Yes, I suppose I want that! :-) I hope this works with --force as well
> if there is a dir in --files-from? But futher supposing it takes quite
> a long time until I can suppose every user with medicore updateness
> has a rsync installed that can do this. For now I made it in ssh-less
> pure rsync-mode to call rsync once for with --files-from for all files
> that created/changed, and then for every directory in which stuff has
> been deleted/movedfrom.
>
> I got another question tough running extensive tests, the daemon
> happens to do this once in a while if creates/deletes/moves piling up
> faster than inotify tracks, it calls rsync for a source->destination
> pair, where the source dir no longer exists, normally would be no
> problem:
>
> $ /usr/bin/rsync -vP  -d /tmp/ltest.WQS/src//n/c/d/ /tmp/ltest.WQS/trg//n/c/d/
> building file list ...
> rsync: change_dir "/tmp/ltest.WQS/src//n/c/d" failed: No such file or
> directory (2)
> 0 files to consider
> created directory /tmp/ltest.WQS/trg//n/c/d
>
> I expect rsync to just fail in that case, but it creates the target
> directory nevertheless :-( Is there some parameter I can add to rsync
> so it wont create directories on the target, if there isnt a source
> directory for it?
>
> Kind regards, Axel
>


More information about the rsync mailing list