Re: [ilugd] FTP error while running script in cron

2009-12-03 Thread PJ
Amit Sharma amit_...@... writes:

 Lets See!

One more thing to check is that in console mode and in cron mode the file
transferred across is in bin mode. In the script, for the EOT here-doc stick in
bin in before you put the file. In console mode use type to check the
status (or just type bin anyway). ascii and bin *should* both take up the same
space, but maybe there is a compressed file system on the server which coupled
with ascii vs bin is causing the discrepancy.

PJ



___
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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Vivek Kapoor

On 12/02/2009 10:01 AM, Amit Sharma amit_...@yahoo.com wrote:



Any pointers?


If a script runs from the console but not from cron, 99% of the time
it's one of these two things -

1. The user which executes the cron script is not the same 
But the scripts runs for say 18Gb and then gives the 'not enough disk space error'


Do any of your partitions have ~18GB as free space? Do a `df -h` and see

Regards
Vivek Kapoor
http://exain.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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Amit Sharma
 Any pointers?
 
 If a script runs from the console but not from cron, 99% of the time
 it's one of these two things -
 
 1. The user which executes the cron script is not the same        


 But the scripts runs for say 18Gb and then gives the 'not enough disk space 
 error'

Do any of your partitions have ~18GB as free space? Do a `df -h` and see

Yes. Many Partitions have 18GB or more free space.

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..

Hope this clarifies the issue.

regards,
Amit


  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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Vivek Kapoor

On 12/02/2009 06:06 PM, Amit Sharma amit_...@yahoo.com wrote:

Any pointers?

If a script runs from the console but not from cron, 99% of the time
it's one of these two things -

1. The user which executes the cron script is not the same




But the scripts runs for say 18Gb and then gives the 'not enough disk space 
error'


Do any of your partitions have ~18GB as free space? Do a `df -h` and see

Yes. Many Partitions have 18GB or more free space.



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? 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).


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


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.


Regards
Vivek Kapoor
http://exain.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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread PJ
Amit Sharma amit_...@... writes:

 
 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..

Sounds like you're getting spanked on the ass by the reserved space option of
your filesystem (see -m option in mkfs.ext2)

Check the free space fraction left over. Root has privileges to use the last 5%
of free space, non-root users don't.

PJ

(ilugd dot to dot peejay at spamgourmet dot 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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Amit Sharma
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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Arun Khan
On Wednesday 02 Dec 2009, Amit Sharma wrote:

 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..

 Hope this clarifies the issue.

Not really, the error message is clear enough saying the fs is out of 
space :(.  Perhaps there is some other job (on the ftp server) that 
comes by and cleans up the fs and when you try it manually, voila there 
is enough space and your file transfer succeeds!

I suggest that you discuss the issue with the sys admin of the ftp 
server that your connecting to (seriously) before banging your head on 
your script :D

I also suggest that you disable your cron for one week and run the 
script manually @ 23:45 hours on the day that is programmed in your 
cron settings and see if you get fs full error.

-- Arun Khan

___
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/


Re: [ilugd] FTP error while running script in cron

2009-12-02 Thread Amit Sharma


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

 Hope this clarifies the issue.

Not really, the error message is clear enough saying the fs is out of 
space :(.  Perhaps there is some other job (on the ftp server) that 
comes by and cleans up the fs and when you try it manually, voila there 
is enough space and your file transfer succeeds!

I suggest that you discuss the issue with the sys admin of the ftp 
server that your connecting to (seriously) before banging your head on 
your script :D

I also suggest that you disable your cron for one week and run the 
script manually @ 23:45 hours on the day that is programmed in your 
cron settings and see if you get fs full error.

Could be one of the possibilities, yesterday I have changed the time from 2345 
to 1345.

Lets See!

-- amit



  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/


Re: [ilugd] FTP error while running script in cron

2009-12-01 Thread Sawrub

On 12/01/2009 11:18 AM, Amit Sharma wrote:


Hi,
Some questions...
a) Is the destination directory the same as when you run it from terminal
yes, script is the same

b) How frequently does the cron script run?
Once a week

c) Is the destination actually running out of space?
No, if I run the script as is from commabd prompt, it just runs

d) Are you just adding files or overwriting them?
First deleting the file, then copying it

e) Is the cron job being run as the same user from commandline?
yes it is from root on both , actually from cron it copies says 18GB and then 
gives disk full error.


   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/

   
Since most of the pointers are going towards the permissions but all in 
vain. Can u please pass on the script to the list so that people can try 
out.


--
Saurabh Sharma
Linux user number: 490644
http://sawrub-blog.blogspot.com/
Open your doors...It's time to look beyond Windows


___
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/


Re: [ilugd] FTP error while running script in cron

2009-12-01 Thread Amit Sharma


 Any pointers?

If a script runs from the console but not from cron, 99% of the time
it's one of these two things -

1. The user which executes the cron script is not the same 
        But the scripts runs for say 18Gb and then gives the 'not enough disk 
space error'


2. The script depends on something in .bashrc (and .bashrc is NOT
executed automatically before running cron scripts).

same answer as above.


  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/


Re: [ilugd] FTP error while running script in cron

2009-12-01 Thread Saurabh Sharma
On Tue, Dec 1, 2009 at 7:30 PM, Sawrub luckysharm...@gmail.com wrote:
 On 12/01/2009 11:18 AM, Amit Sharma wrote:

 Hi,
 Some questions...
 a) Is the destination directory the same as when you run it from terminal
 yes, script is the same

 b) How frequently does the cron script run?
 Once a week

 c) Is the destination actually running out of space?
 No, if I run the script as is from commabd prompt, it just runs

 d) Are you just adding files or overwriting them?
 First deleting the file, then copying it

 e) Is the cron job being run as the same user from commandline?
 yes it is from root on both , actually from cron it copies says 18GB and
 then gives disk full error.


       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/



 Since most of the pointers are going towards the permissions but all in
 vain. Can u please pass on the script to the list so that people can try
 out.

 --
 Saurabh Sharma
 Linux user number: 490644
 http://sawrub-blog.blogspot.com/
 Open your doors...It's time to look beyond Windows



Seems that you don't want to share the script, then please check the
paths defined in the script. The relative paths used in can also be
the cause of the issue.

--
Saurabh Sharma
Linux user number: 490644
http://sawrub-blog.blogspot.com/
Open your doors...It's time to look beyond Windows

___
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/


Re: [ilugd] FTP error while running script in cron

2009-12-01 Thread Amit Sharma




 Since most of the pointers are going towards the permissions but all in
 vain. Can u please pass on the script to the list so that people can try
 out.

 --
 Saurabh Sharma
 Linux user number: 490644
 http://sawrub-blog.blogspot.com/
 Open your doors...It's time to look beyond Windows



Seems that you don't want to share the script, then please check the
paths defined in the script. The relative paths used in can also be
the cause of the issue.

Don't mind sharing script.

Question is that same script acts differently when tun in console and through 
cron?

Just to cross check I have changed time in CRON and right now the script seems 
to be working fine. 34 of 38G has been copied till now.

Earlier I was running the script at 11:45 PM in cron. Timing Problem!!??

regards-
amit



  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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread rakesh kumar
Can you emphasize the term script, i mean what did you do exactly?
regards
rakesh

On Mon, Nov 30, 2009 at 1:03 PM, Amit Sharma amit_...@yahoo.com wrote:

 Hi

 I have facing a strange problem while uploading data file using FTP in
 cron.

 I have made a script to upload 40GB approx tar.gz file to a FTP location.

 When I run the script in console, it works fine and uploads the file
 without any issue.

 When I schedule it in cron and make it run automatically, FTP upload fails
 with error :

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

 But when I run the script again in command prompt, the data gets uploaded
 without any issue.

 Any pointers?

 regards,
 amit


  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/

___
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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Arun Khan
On Monday 30 Nov 2009, Amit Sharma wrote:

 Any pointers?

Are you logging in to the FTP server using the same userid/passwd in 
both cases?

-- 
Arun Khan

___
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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Sawrub

On 11/30/2009 11:28 PM, Arun Khan wrote:

On Monday 30 Nov 2009, Amit Sharma wrote:

   

Any pointers?
 

Are you logging in to the FTP server using the same userid/passwd in
both cases?

   
+1 for Arun, the issue is most probably with the user who is firing the 
script.


--
Saurabh Sharma
Linux user number: 490644
http://sawrub-blog.blogspot.com/
Open your doors...It's time to look beyond Windows


___
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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Ashish SHUKLA
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amit Sharma writes:
 Hi

 I have facing a strange problem while uploading data file using FTP in cron.

 I have made a script to upload 40GB approx tar.gz file to a FTP location.

 When I run the script in console, it works fine and uploads the file without 
 any issue.

 When I schedule it in cron and make it run automatically, FTP upload fails 
 with error :

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

Are you sure the FTP user accounts being used for uploading the file in both
cases are same ? Also you can try enabling verbose login on your FTP client
and see where/how it is trying to upload ? and also verify the presence of
file at the desired location on FTP server when the cron job to make sure file
is being uploaded at right place.

HTH
- -- 
They who can give up essential liberty to obtain a little temporary safety,
deserve neither liberty nor safety.
  -- Benjamin Franklin, Memoirs of the life and writings of Benjamin Franklin
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.13 (FreeBSD)

iEYEARECAAYFAksUNqgACgkQHy+EEHYuXnQEdQCgg6/toh+86ZuRqUgxw+lZDB5r
krMAniGTBR6pQ2s+HZm17huV4+IDP3v6
=ofsw
-END PGP SIGNATURE-

___
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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Amit Sharma


[snip]

 When I schedule it in cron and make it run automatically, FTP upload fails 
 with error :

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

Are you sure the FTP user accounts being used for uploading the file in both
cases are same ? Also you can try enabling verbose login on your FTP client
and see where/how it is trying to upload ? and also verify the presence of
file at the desired location on FTP server when the cron job to make sure file
is being uploaded at right place.

[snip]

Script is the same, if i run it as root in command prompt it works file, the 
same script when I schedule through cron it shows error after uploading say 
18GB data. Hence authentication works fine, location is correct etc.

Why is it that it works fine from command prompt and breaks in between with 
error when I run the *same* script through cron.

-- amit


  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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Shiv

--- On Tue, 1/12/09, Amit Sharma amit_...@yahoo.com wrote:

 From: Amit Sharma amit_...@yahoo.com

  When I schedule it in cron and make it run
 automatically, FTP upload fails with error :
 
 
 Why is it that it works fine from command prompt and breaks
 in between with error when I run the *same* script through
 cron.

Hi,
Some questions...
a) Is the destination directory the same as when you run it from terminal 
b) How frequently does the cron script run?
c) Is the destination actually running out of space?
d) Are you just adding files or overwriting them?
e) Is the cron job being run as the same user from commandline? 



With Warm Regards, 
Shivkumar 
linux user no: 450769
blog: outbackwifi.blogspot.com 
profile: www.linkedin.com/in/shivjags



  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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Amit Sharma


Hi,
Some questions...
a) Is the destination directory the same as when you run it from terminal 
yes, script is the same

b) How frequently does the cron script run?
Once a week

c) Is the destination actually running out of space?
No, if I run the script as is from commabd prompt, it just runs

d) Are you just adding files or overwriting them?
First deleting the file, then copying it

e) Is the cron job being run as the same user from commandline? 
yes it is from root on both , actually from cron it copies says 18GB and then 
gives disk full error.


  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/


Re: [ilugd] FTP error while running script in cron

2009-11-30 Thread Anupam Jain
On Mon, Nov 30, 2009 at 1:03 PM, Amit Sharma amit_...@yahoo.com wrote:
 Hi

 I have facing a strange problem while uploading data file using FTP in cron.

 I have made a script to upload 40GB approx tar.gz file to a FTP location.

 When I run the script in console, it works fine and uploads the file without 
 any issue.

 When I schedule it in cron and make it run automatically, FTP upload fails 
 with error :

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

 But when I run the script again in command prompt, the data gets uploaded 
 without any issue.

 Any pointers?

If a script runs from the console but not from cron, 99% of the time
it's one of these two things -

1. The user which executes the cron script is not the same
2. The script depends on something in .bashrc (and .bashrc is NOT
executed automatically before running cron scripts).

-- Anupam

___
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/


[ilugd] FTP error while running script in cron

2009-11-29 Thread Amit Sharma
Hi

I have facing a strange problem while uploading data file using FTP in cron.

I have made a script to upload 40GB approx tar.gz file to a FTP location.

When I run the script in console, it works fine and uploads the file without 
any issue.

When I schedule it in cron and make it run automatically, FTP upload fails with 
error :

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

But when I run the script again in command prompt, the data gets uploaded 
without any issue.

Any pointers?

regards,
amit


  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/