Backup and renaming old file that became directory
Matt McCutchen
hashproduct+rsync at gmail.com
Wed Aug 2 01:23:59 GMT 2006
Rsync doesn't seem to have very good checking for cases in which
backing up a file fails. Callers of keep_backup expect its return
code to indicate whether the backup succeeded (1) or failed (0), but
it returns 1 even if one of the subroutines it uses fails. It should
be easy to check the return codes of the subroutines and return 0 if
appropriate.
In general, what is the right thing to do if a file in the backup dir
is in the way of a receiver file about to be backed up? (Right now,
keep_backup claims that it succeeded, and rsync continues under the
illusion that the receiver file is gone.) Should rsync rename the
file in the backup dir out of the way? Should it back up the receiver
file under a different name? Or should it be documented somewhere
that the backup dir must be empty when rsync starts?
Matt
More information about the rsync
mailing list