/usr/bin/rsync -avx --delete --numeric-ids --relative --delete-excluded \ --exclude=/www/*/bin/ --exclude=/www/*/dev/ --exclude=/www/*/etc/ \ --exclude=/www/*/lib/ --exclude=/www/*/usr/ --link-dest=/backup/daily.1/ \ /etc/ /backup/daily.0/ building file list ... done /etc/./ rsync: recv_generator: mkdir "/backup/daily.0/etc/." failed: File exists (17) /etc/adjtime /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin . . . rsync error: some files could not be transferred (code 23) at main.c(791)
Created attachment 1292 [details] Ignore EEXIST on second mkdir() call
Please double-check the rsync version on both ends of the transfer. I can duplicate the bug with the args you mention back in 2.5.7 and 2.6.0, but not in 2.6.1 or newer -- at least, not without adding either --no-implied-dirs or --exclude='*/'. The difference is that newer rsyncs prefer to use the path /etc/ rather than /etc/./, , and it is the trailing . dir that tickles the bug (due to create_directory_path() creating the actual directory itself instead of just the path through the parent directory). In any case, the just-attached patch fixes the problem in the CVS version.
I should also mention that you can avoid the bug by simply never using a trailing slash on a source path when using --relative (there's no difference in behavior with or without a trailing slash when --relative is used). Also, your --excludes won't exclude anything because they are anchored at /www and the transfer is starting at /etc (due to the --relative option).
I use rsnapshot as a backup tool to backup some files on a different location on the same partition. I backup 3 folders, but the exclude-directory defined in rsnapshot get forwared to every rsync call. That's why they are listed there. And to your other question, cause of a local backup, the rsync version should not differ :) I already had the same problem on another computer, but upgrading from 2.6.0 to 2.6.5 fixed it. This time it did not help though. Just tried out the remove slash in the source path.. that works, yes! :) I tried several different arguments, but never tried without the slash Thank you :)