Re: [CRON] Recommended FTP client to download and upload files?

2008-05-09 Thread Gilles
On Sat, 03 May 2008 16:46:27 +0200, Gilles [EMAIL PROTECTED]
wrote:
What command-line FTP client would you recommend for this?

It looks like lftp is not running like I thought it would :/ Until I
ran the following commands manually instead of through CRON, some
files on the remote source FTP server dated May 6th/7th were not
downloaded locally and then uploaded to the target remote FTP server:

1. Here's the script:

# cat /var/sync.bash 

#!/usr/local/bin/bash
echo Downloading from Source FTP
lftp -u joe,sixpack -e mirror -vn ./files /var/depot  bye
ftp.source.com

echo Uploading to Target FTP
lftp -u joe,sixpack -e mirror -vnR /var/depot ./downloads  bye
ftp.target.com

2. When run manually:

# ./sync.bash 
Downloading from Source FTP
Total : 1 directory, 41 files, 0 symlinks
Uploading to Target FTP
Total : 1 directory, 41 files, 0 symlinks
To be removed: 0 directories, 2 files, 0 symlinks

3. CRON:

# crontab -l
5,35 * * * * /var/sync.bash /dev/null 21

= What does To be removed: 0 directories, 2 files, 0 symlinks
actually mean?

Thanks for any tip.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [CRON] Recommended FTP client to download and upload files?

2008-05-09 Thread Gilles
On Sat, 10 May 2008 01:53:13 +0200, Gilles [EMAIL PROTECTED]
wrote:
It looks like lftp is not running like I thought it would

Found what it was: The script worked fine when ran manually, but
failed when ran by CRON because it couldn't locate lftp:

Downloading from Source FTP
/var/sync.bash: line 3: lftp: command not found
Uploading to Target FTP
/var/sync.bash: line 6: lftp: command not found

Moral of the story: Start by leaving error messages as is before
redirectering them to /dev/null once the script proved to work.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [CRON] Recommended FTP client to download and upload files?

2008-05-04 Thread Gilles
On Sat, 03 May 2008 11:34:30 -0700, prad [EMAIL PROTECTED]
wrote:
i like lftp the best. you can script it and everything has always
worked smoothly for me using it.

Thanks guys, lftp did the job. I'll put those two lines in a script
and add it to CRON:

lftp -u joe,mypass -e mirror -vn ./files ./mirror  bye
ftp.source.com

lftp -u joe,mypass -e mirror -vnR ./mirror ./files  bye
ftp.target.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


[CRON] Recommended FTP client to download and upload files?

2008-05-03 Thread Gilles
Hello

I need to run a CRON job to download files from one FTP server if
they're more recent, and upload them to another FTP server. The files
all live in one directory, so there's no need for recursion.

What command-line FTP client would you recommend for this?

Thank you.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [CRON] Recommended FTP client to download and upload files?

2008-05-03 Thread Andrew Pantyukhin
On Sat, May 03, 2008 at 04:46:27PM +0200, Gilles wrote:
 Hello
 
   I need to run a CRON job to download files from one FTP server if
 they're more recent, and upload them to another FTP server. The files
 all live in one directory, so there's no need for recursion.
 
 What command-line FTP client would you recommend for this?

ftp(1)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [CRON] Recommended FTP client to download and upload files?

2008-05-03 Thread Jeffrey Goldberg

On May 3, 2008, at 9:46 AM, Gilles wrote:


I need to run a CRON job to download files from one FTP server if
they're more recent, and upload them to another FTP server. The files
all live in one directory, so there's no need for recursion.

What command-line FTP client would you recommend for this?


lftp in ports.

It is very scriptable and has built in facilities to only copy newer  
files.


Cheers,

-j

--
Jeffrey Goldberghttp://www.goldmark.org/jeff/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [CRON] Recommended FTP client to download and upload files?

2008-05-03 Thread prad
On Sat, 03 May 2008 16:46:27 +0200
Gilles [EMAIL PROTECTED] wrote:

 What command-line FTP client would you recommend for this?

i like lftp the best. you can script it and everything has always
worked smoothly for me using it.

-- 
In friendship,
prad

  ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]