Bug 3929 - after upgrade from 2.6.6 to 2.6.7 --delete is not functional
after upgrade from 2.6.6 to 2.6.7 --delete is not functional
Status: CLOSED FIXED
Product: rsync
Classification: Unclassified
Component: core
2.6.7
x86 Linux
: P3 critical
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-13 09:27 UTC by Jiri Reischig
Modified: 2006-10-15 13:26 UTC (History)
0 users

See Also:


Attachments
Fixed an exclude bug with --relative (530 bytes, patch)
2006-08-12 11:24 UTC, Wayne Davison
no flags Details
Fix the problem with --delete --relative (372 bytes, patch)
2006-08-26 11:03 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Reischig 2006-07-13 09:27:49 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.
Comment 1 Wayne Davison 2006-08-12 11:20:53 UTC
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.
Comment 2 Wayne Davison 2006-08-12 11:24:03 UTC
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.
Comment 3 Jiri Reischig 2006-08-15 05:22:33 UTC
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:

/cdrom/?*
/floppy/?*
**/lost+found/?*
/mnt/*?
/proc/?*
/sys/?*
/tmp/?*
/var/tmp/?*
/initrd/proc/?*
/var/spool/squid/**
/var/spool/up2date/**
/var/cache/yum/**
/SWAP
/usr/src/redhat/BUILD/**
/var/log/ipacct/*
/home/home-old/**
/home/*/noBackup/**
/home/*/Drives/**
/home/*/.kde/share/cache/**
/home/*/.netscape/cache/**
/home/*/.galeon/mozilla/galeon/Cache/**
/home/*/.mozilla/*/*/Cache/**
/home/*/.opera/cache4/**
/home/**/*.mp3
/home/**/*.mpg
/home/**/*.wav
/home/**/*.avi
Comment 4 Wayne Davison 2006-08-26 11:03:52 UTC
Created attachment 2106 [details]
Fix the problem with --delete --relative

This patch fixes the problem you're experiencing.
Comment 5 Wayne Davison 2006-08-26 11:04:56 UTC
I've checked-in the fix.
Comment 6 Jiri Reischig 2006-08-29 03:46:15 UTC
You are right, the 2nd patch resolve my problem.

Thank you very much.