Results 1 to 5 of 5
I have a script (really 2) that ftps a file to another server.
If I run the script manually it processes fine.
I then put it into cron and it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-07-2007 #1Linux Newbie
- Join Date
- Jun 2006
- Posts
- 141
Weird ftp problem
I have a script (really 2) that ftps a file to another server.
If I run the script manually it processes fine.
I then put it into cron and it has failed. Sometimes I get nothing in my log and sometimes I get 'EPSV': command not understood.
Here is my command and the file it executes.
command:
#!/bin/sh
ftp -n < /opt/mace/ftp_thedb.sh
file to execute:
open xx.xx.xx.xx
quote user ftpuser
quote pass ueserpass
binary
lcd /backup_dir
put lits2*
quit
What am I missing????????? It's driving me to drink(thank goodness
But it is a little crazy also.
thanks
MaceLast edited by mace; 12-07-2007 at 07:10 PM. Reason: wrong spelling
- 12-08-2007 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Don't you need mput if you're using wildcards? Don't forget to toggle prompts off, too. (Or is lits2* a typo?)
- 12-10-2007 #3Linux Newbie
- Join Date
- Jun 2006
- Posts
- 141
lits2* isn't a typo, it is to ensure I get the file and incase there are more than 1 I get them all.
thanks
Larry
- 12-12-2007 #4Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
But if you're getting multiple files, you need to use "mput", surely?
- 12-13-2007 #5Linux Newbie
- Join Date
- Jun 2006
- Posts
- 141
First I'd like to thank you who helped.
Now to be humbled. After redoing the scripts only 1 of my 3 transfers worked.
Humm must be a timing problem, I'll change the order they are started and wait until the next day and see what happens.
Well I just got my 1st pair of glasses(at 54) and when I went in to edit cron I notices something funny.
Instead of having 2>&1 I had 2>$1 at a 10 font the 2 signs looked simular. The reason it happened on 2 ftps on 2 different servers is the name transfer were the same so I just cut and pasted the error.
Thanks for the help(eating crow)
Mace


Reply With Quote
