|
perl ftp get file once,push x times
hello all
I need a few tips on how i can accomplish a rather simple tasks but a little confusing.
##The task:
Involves getting numerous files one by one from a source server via ftp and pushing that file into a number of other remote servers...say x servers.
the ftp program will be run from cron every hour.
##The process:
my perl ftp program is required to login to a source server A, go to a specific directory and get all files there...login again, send the files one by one to remote server B, C, D, E.
if the fetch and push is Sucsess in all B, C, D, E delete the file from A.
if either of the push fails in either one of the servers say...server B being down, my perl script needs to NOT delete the file on server A unless the transfer to server B is also Successful.
##ideas:
Im thinking of say - retrying the tranfer after every 30 seconds....but also am seeing a possibility of server being down for hours...
Am not able to figure out in my mind how i can get through this problem, any help is appreciated.
|