The Samba-Bugzilla – Bug 3929
after upgrade from 2.6.6 to 2.6.7 --delete is not functional
Last modified: 2006-10-15 13:26:33 UTC
After upgrade from 2.6.6 to 2.6.7 --delete is not functional - deleted files on source server is not deleted in destination directory.
Before upgrade and after upgrade I use the same command.
I was use rsync to backup whole server with this command:
"rsync -aRHvzh -e ssh --delete --delete-excluded --force --numeric-ids --exclude-from=exclude-file server-name:/ /var/backup/backup-dir"
There is about 50 GB file size on the backuped server.
When I try backup about ten files and dirs with this command:
"rsync -aRHvzh -e ssh --delete --delete-excluded --force --numeric-ids --exclude-from=exclude-file server-name:/home/user/ /var/backup/backup-dir" deleted files on source server was deleted on destination directory.
May be, there is some problem with a lot of files.
I try also 2.6.8 version on both servers but with the same problem.
Please attach the exclude-file list so that I can check to see if I have fixed this bug or not. I just found a bug in the exclude code when --relative (-R) is in effect.
Note that using -R with a source path of "/" has no effect (other than making rsync more buggy), so you should be able to get this to work by just dropping the -R from your first command.
Created attachment 2091 [details]
Fixed an exclude bug with --relative
There was a problem where the "/" could get excluded when --relative is in effect. This patch fixes this.
Thank you for your help.
I try your patch on both servers (rsync version 2.6.8) without solution with my problem.
When I downgrade rsync to verion 2.6.6 on my client server (on server is 2.6.8 version) files are deleted on backup server.
There is my exclude file:
Created attachment 2106 [details]
Fix the problem with --delete --relative
This patch fixes the problem you're experiencing.
I've checked-in the fix.
You are right, the 2nd patch resolve my problem.
Thank you very much.