rsync --delete* Bug or feature-request

Gabriel CORRE gac at 4js.com
Tue Jul 29 15:19:17 GMT 2008


Hello,

I'm trying to do a differential backup. Each commands/scripts are launch on backup server side.

- rsync-ref: 1 script perform a complete backup to a directory "ref".
   something like that:
     rsync --archives \
       station:/path1/ /servbasepath/ref/servpath1/

- rsync-diff: 1 script perform a differential backup to a directory "diff".
   something like that:
     rsync --archives \
       --compare-dest=/servpath1/ \
       --delete \
       station:/path1/ /servbasepath/diff/servpath1/


See the following scenario:

on serv:
  - rsync-ref is done
    Result: large number of files are synchronized.
on station:
  - the user create a new file "test"
on serv:
  - rsync-diff is done
    Result: the new file "test" was synchronized in diff directory.
  - do rsync-ref
    Result: the new file "test" was synchronized in ref directory.
  - do rsync-diff
    Result: nothing done, all file are synchronized.
    That is my problem:
    the file "test" in diff directory may/must be deleted,
    because it is already on the ref directory.


I think --delete (or some other --delete-* options too) should remove
the file because it is already found in ref directory.

But Is it really a bug ?
or may I request a --delete-if-found-in-compare-dir ?

For workaround I run a script that find duplicated copies of files on
the both directories. And run the rsync-diff after.
But I work on more than 6 millions of files, the rsync and find-scrtipt took a very lot of time.
Rsync already compare the both dir with --compare-dest then
it will probably easily append duplicated files to the delete queue.

What is your opinion ?

Best Regards

PS: Sorry for my not very well english.

-- 
Gabriel CORRE
gac at 4js.com - Four J's Development Tools - www.4js.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/rsync/attachments/20080729/855eb5ed/signature.bin


More information about the rsync mailing list