rsync - update file on backup when file renamed on source

hi all,

Please help me with rsync.

I configured rsync to preserve timestamps using the -a option.
When i renamed fileA to fileB on source machine I have to copies at the backup server.
The aim is to keep the most recent file.
fileA & fileB has same contents.

When i renamed fileB to fileA on source , fileA is not updated on the backup server.
Can anyone plz help with the rsync options ??

Thanks

How should rsync know that former file A is now file B? Different file name == different file; afaik there is no such option. You can try out with --delete option so that on the destination side the files will be deleted, that do not exist on the source. But try this using the try-run option (-n) first so you don't delete accidentally stuff you still need.

OK.Thanks