Problem with --backup and deleting a directory: Two directories created

Johannes Kastl bierkastl at freenet.de
Mon Nov 15 14:20:46 GMT 2004


Hello everyone,

Im kinda new to rsync and this list, so if there are any errors in 
my reqest, please tell me.

I want to use rsync to make a backup of a diretory, and use the 
--backup option. My script looks like this:

rsync -ab --suffix=-`date -Iminutes` --backup-dir=rsync_backup 
--delete  --rsh=ssh directoryA directoryB

If I run it once, then delete the file directoryA/test/test.file, 
the directorys directoryB/rsync_backup/test is created, and the file 
test.file-204-11-15.... is created.
So everything works fine.

When I delete or rename a directory (e.g. 
directoryA/test/delete-this), I would have guessed that a directory 
directoryB/rsync_backup/test/delee-this-2004-11-15... is created, 
and all the files in the deleted directory are moved to this 
directory. And the name of the files is changed to 
file.name-2004-11. At least that is what I would expect.
But that doesnt happen.

In fact, a directory directoryB/rsync_backup/test/delete-this is 
created, and the files are copied there. The names are changed 
correct. But there is also a directory delete-this-2004-11-15... , 
but it is empty, and no files are copied/moved there afterwards.

If there is a direcotry with the same name later again, and it is 
deleted, the files also go to this directory, and another empty 
directory is created.

QUESTION: Is there an error in my expextations? Why is rsync 
renaming the directory but there are no files in it? Is there an 
option I forgot, or some error in my rsync-command? Or is this an 
error in rsync itself?

Thanks in advance, I hope I explained the problem so you can understand.

OJ

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


More information about the rsync mailing list