Hi,

In rsync 2.5.5, I've noticed that when --backup is used along with
the --delete and -v options, no message is printed when an obsolete file is
'deleted' from the destination directory (or more precisely, moved away and
never replaced).

Apart from resorting to -vv (which is total overkill), apparently the only
way to learn about such 'deleted' files is to manually look over the '~'
files after running rsync, or the files in the backup directory
(when --backup-dir is used). This can be very tedious work.

So, I think 'deleted' files should be logged in the same manner as
when --backup is not used.

Attached is a simple 3-line patch which fixes that. I've designed it to work
like non-"--backup" file deletion in that:
- The log message says the same thing: "deleting %s\n"
  (so that scripts parsing the output can look for the same keyword)
- The message is printed *after* the file is backed up
- The message is only printed if the backup was successful

Could this be included in the next version?

Thanks,
Jordan Russell

Attachment: backup-delete-verbose.patch
Description: Binary data

Reply via email to