Click to See Complete Forum and Search --> : Cron Job across network: timed file gets


Syngin
07-07-2005, 11:14 AM
Hi guys,

I'm trying to figured out the best way to set up a daily cron job for grabbing a data dump from another Linux box. I'd prefer to use sftp if possible but I'm not sure how to go about setting up a script for this? There's a firewall inbetween the 2 systems (ie. one outside and one inside) so I don't think Samba would be a good idea.

Anyone have some inside info or have done something similar to this before? I've got all the cron data replacement scripts all set up. Just need to get the data there

Icarus
07-07-2005, 01:18 PM
scp is good if the other system has sshd running
rsync is an option also

with ftp, ncftpget would be able to do it simply
ncftpget -u ****** -p ****** ftp://192.168.1.100/filetoget

the negative with ncftpget is that it can't changed directories, so as long as the login is chrooted to the correct directory it works

Syngin
07-07-2005, 04:42 PM
Thanks Icarus,

That will definitely come in handy. ;)

techwise
07-07-2005, 05:00 PM
Yep, I can vouch for rsync over ssh. I use this very combination in conjunction with cron to backup 5 linux servers from my backup server. Only the backup box runs the cron jobs and I setup pub key auth on all the linux boxes so that ssh could run under cron without interactivity.

Works like a dream and is acceptably secure for wan situations.

Mike