>I asked the question to ascertain if there's a particular partition, say /tmp 
>which has around 18GB of disk >space and the file is temporarily transferred 
>there. Since the disk space is limited to ~18GB, the file being >transferred 
>there temporarily isn't copied completely, and instantly gives the error and 
>halts. Just a guess. >You may want to check the disk sizes while the upload is 
>in progress.

>I would like to emphasise on the point again .....
> 
>Same Script is able to successfully transfer (FTP) 40GB data when run as user 
>root
>in command prompt. When same script is scheduled in cron for 2345 hrs (weekly),
>script runs and transfer say 18GB of data and terminates with error
>426 Connection closed; Not Enough Disk Space. Aborting..

>How do you know that it gives the error "426 connection closed"? 

Cron Daemon sends email to root (part of email is given below)

           426 Connection closed; Not Enough Disk Space. Aborting..

When i run the script manually, here is the email text:

           226 File received ok.


>Do you check the cron logs or get an email >from cron? Are you logging the 
>error somewhere? What does >your cron line show - if you can share that (you 
>>may hide the script name).

Here is the script:
-------------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/bash
#Daily Backup Script for backing up /home/bkup
echo Time backup started = $(date +%T)
before="$(date +%s)"
datestamp="$(date)"
tempdate="$(date +%F)"

########################################
HOST='192.168.1.20'
USER='abc'
PASSWD='def'
ftp -n -v $HOST << EOT
user $USER $PASSWD
delete /bkup/Linux_folder_backup.tar.gz
put /bkup/Linux_folder_backup.tar.gz
bye
EOT
sleep 12
#########################################
# Calculates and outputs total time take
after="$(date +%s)"
elapsed="$(expr $after - $before)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo  "Weekly FTP Upload -" $datestamp " - Time Taken $hours hours $minutes 
minutes $seconds seconds" >> /root/ftpupload.log
echo "- - - - - - - - - - - - - - - - - -" >> /root/ftpupload.log
cat /root/ftpupload.log | mail -s Weekly_FTP_upload_$tempdate amit_...@yahoo.com

----------------------------------------------------------------------------------------------------------------------------------------------------------

>Also, about the 2345 Hrs weekly part - I'm sure you would have tested it at 
>other times also. Can you check, >thru cron, at some other time than 2345 Hrs, 
>to upload the file, and simultaneously monitor the local and >remote server 
>about which file systems are being filled up. That can give some indication 
>about what next to >check. This would work if you have shell access to both 
>the servers. For e.g. /tmp is getting filled up and then >it is transferring 
>to say /data/filename.tar.gz

Here is :
vi /var/spool/cron/root

45 23 * * 6 /scripts/FTPuploadWeekly

>I understand the script being run manually works, but not thru cron. Maybe 
>thru cron the $PATH is not >available and the desired binaries are not usable. 
>You may be using "expect" scripts, or php/python to do the >ftp and their 
>paths are incorrect (as an example your version of php is installed in 
>/usr/local/bin/php, and the >system is taking /usr/bin/php).

>Last, the yahoo account that you're using somehow mangles the e-mails, and 
>becomes difficult quoting it. >Maybe you can shift to plain text while 
>replying to the e-mail, would help.

Hope this one is better!



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to