File Management: Removing of files from Server2 IF the same file is removed from Server1.

Hi Folks,

I have a requirement of file management on different servers.

Source Server is SERVER-A.

Two servers will fetch files from SERVER-A: SERVER1 and SERVER2.

4th SERVER is SERVER-B, It will fetch files from SERVER1. If SERVER1 goes DOWN, SERVER-B will fetch pending files from SERVER2(no duplicity).

Suppose, Server1 has 4 files file1/2/3/4 (It fetched it from SERVER-A) and SERVER2 also 4 files file1/2/3/4(it also fetched it from SERVER-A). There is no SYNC between SERVER1 and 2.

Now SERVER-B will fetch file1/2 from SERVER1 and it will delete same. So SERVER1 has now file3/4. SERVER1 goes down.
So SERVER-B will start picking file from SERVER2(SERVERB will be manually pointed to SERVER2), but it should only pick file3/4 as file1/2 were already picked.

I need a mechanism by using which - If SERVER-B deletes a file from SERVER1, then it also get deleted from SERVER2 - NOTE SERVER-B is not capable to do this, so this has to be done from SERVER1 end. If file1/2 is removed from SERVER1, then it should delete it from SERVER2.

Please let me know if more clarification is required.

I think, RSYNC is one of the way, but requirement is limited.

Thanks to all in advance.

Raza Ali

Pls show how and where "SERVER-B ... will delete same". Will all files 1 - 4 be deleted from server1 if all went well? Will they also be deleted from server2 if all went well? Does server-B have a list of files to copy? A list of files done and to be deleted?

Also, pls indicate how "this has to be done from SERVER1" if server1 is down?

Hi RudiC,

Thank you for reverting.

Pls show how and where "SERVER-B ... will delete same".: either delete OR move to another directory.

Will all files 1 - 4 be deleted from server1 if all went well?: YES

Will they also be deleted from server2 if all went well?: YES, this is what we want to avoid duplicity(if SERVER1 goes DWON, SERVER-B will be pointed to SERVER2 and it should pick only those files which are not picked from SERVER1).

Does server-B have a list of files to copy? A list of files done and to be deleted?: NO - SERVER-B knows a directory on SERVER1 from where it will pick files and either delete it or ARCHIVE it to another directory.

SERVER-A(In fact it combination of 6 SERVERs - but not relevant to us) is generating lots of files, these files are pulled by SERVER1 and SERVER2 separately.

SERVER1 and SERVER2 are at two sites for redundancy.

SERVER-B picks files from SERVER1 and IF SERVER1 goes down it should pick files from SERVER2(but it should not pick the files already picked from SERVER1 - To avoid duplicity).

SERVER-B is another party - I need to check with them, Still please provide suggestion based on your assumption(It will delete or move to another directory).

Thank you.