File Compare & Move between 2 servers

Greetings -

I am a newbie in shell scripts. I have been thru the whole forum but there has been no similar query posed.

The objective of my system is to have a unified filebase system. I am using RSync to synchronise files between the location & central server with both of them having the same folder structure. The flow of RSync being from location server to central server. Now while I am running RSync I need to find the files that have been deleted in the location server, identify those files in the central server and then move those files to "To be deleted" folder in the central server.

Can anyone out here help me with the scripts for the same?

Thanking in anticipation.

Regards,
Aishwarya

Here is a query that is very similar to yours, except that the files are directly being deleted instead of being moved to any "to be deleted" directory.

For more, search the forums. Go to advanced search, search by keyword and select "search entire posts". You may find what you are looking for.

--delete option in RSync means it will delete from the destination and this is something i cannot afford for i need to move those files to separate folder as i need to preserve them for manual intervention.

Is there any other way out? PLs help...

Rgds,
Aishwarya

I have never used rsync, but here's something that you could try:
If the -n (--dry-run) option also shows the files that would get deleted with the --delete option, then use that to find which file would get deleted and then run ssh to make a copy of those files on the remote end to whatever directory that you want. Then run rsync with the --delete but without the --dry-run to actually delete the files.

Again, I must reiterate that I have never used rsync, so I might be totally off target here.

wl try the options u have suggested and revert back.

thanks, ash