(no subject)

Frank Thomas fthomas at radiology.ca
Thu Oct 4 19:57:22 GMT 2007

Good day, 


I've got a question regarding the usage of rsync that I just cannot
figure out. I've done a fare hunt for the answer, but I'm stumped. 


Here is the situation.


I have two pc's running linux and using rsync to perform a backup from
server1 to server2. For example: rsync -avzr -e 'ssh
-i/root/.ssh/id_rsa' --delete /home/samba/admin/software

Let's say I have a directory within rsync's scope to sync called

Rsync is run and directory1 is sync'ed from server1 to server2. Also, a
file named File1 is sync'ed because it is in the directory being


Server1                                                 server2

  Directory1                                               Directory1

     File1                                                        File1


Now, let's say a user comes and changes the name of the Directory1 on
server1 to DirectoryNew, rsync performs the following actions:

1.                   rsync recognizes that Directory 1 is not on
server1, but it is on server2, so it flags it and it's contents for
deletion on server2.

2.                   rsync recognizes that DirectoryNew is on server1,
but not on server2, so it flags it and it's contents for copying to

3.                   rsync performs these actions to make the two
directories the same. 


This action is the simplest method of performing an rsync, but it would
be nice to have rsync to be intelligent enough to recognize a name
change but not an inode change on the source. So the action performed
would be, 

1.                   rsync recognizes that Directory1 is not on server1,
but it's inode still is. Rsync reads the new directory name and flags
the name change from Directory1 to DirectoryNew on server1.

2.                   Rsync reads server2 and sees that Directory1
exists, and flags a pending name change on server2 from Directory1 to

3.                   Name is changed on server2. No files or directories
are deleted and re-transferred from source to destination as the
structure under the directory has not changed.


Why go through all this work? I've had personnel change a directory name
that has several gigabytes of data in it without notifying me and at
night, rsync tries to perform the directory and file dance and fails
simply because the volume is so great. It would be nice to either, one,
recognize a large discrepancy between the source and destination before
anything occurs, by giving a message of amount of potential bytes that
would be transferred, (this doesn't work with dry-run option), or do the
fancy dance by recognizing a name change over a deletion of a directory.




Frank Thomas


-------------- next part --------------
HTML attachment scrubbed and removed

More information about the rsync mailing list