If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I am using a script to automatically download my incremental backups to my backup server. I have created a script which is executed after every 40 minutes in order to update the backup server. I used ftp "ftp -n" for this purpose. Facing a problem that if the link between backup server is not available or there is any problem with file dumping at backup server - I cannot catch the exceptions - I mean error codes. FTP Always returns 0 (successful) even the Backup server is not available. Is there any remedy for that?
the ping is a good solution if you want to check the availability of the server - fine - but what happened when there is some break in connection b/w these two servers?
I am exactly looking at EXIT STATUS solution - which could help me to sort out.
the ping is a good solution if you want to check the availability of the server - fine - but what happened when there is some break in connection b/w these two servers?
I am exactly looking at EXIT STATUS solution - which could help me to sort out.
Thanks anyway !
Unfortunately there is no EXIT STATUS solution, you may have to re-direct the ftp output to a log file and then 'grep' this file for errors.
__________________
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
hi,
I had the same problem and I have a different solution for the same!
You can use ftp library files available in the net, so that you can automate ftp in c and monitor the return status of every get/put commands.
I have a FTP program that I can connect to with users and gropus and that set up. Is there a script on the net that I can intergrate into my website to log into the server?
#!/usr/bin/perl
use Net::FTP;
$ftp=Net::FTP->new("$hostname");
$ftp->login("$user","$password");
$ftp->get("$file") or die "Oh dear file didn't come over properly\n";
$ftp->quit;
exit 0;