sttroopers Posted April 14, 2004 Report Share Posted April 14, 2004 (edited) Ok. Here's what I need to do: I'd like to setup an hourly cron job to take all the .log files from... ftp://me@serverA/files/*.log and copy them to... ftp://me@serverB/files/ Both of these servers require a separate password. I have very limited experience with this sort of thing and any help would be greatly appreciated. Thanks. Edited April 14, 2004 by sttroopers Quote Link to comment Share on other sites More sharing options...
Guest anon Posted April 14, 2004 Report Share Posted April 14, 2004 Rsync is your answer. The list of options are very long, so open a consol and type man rsync If you get stuck, let us know! Quote Link to comment Share on other sites More sharing options...
Qchem Posted April 14, 2004 Report Share Posted April 14, 2004 I'd grab for scp myself, not sure how well this works with ftp sites though. Should be easy to set-up key based access.... Quote Link to comment Share on other sites More sharing options...
sttroopers Posted April 14, 2004 Author Report Share Posted April 14, 2004 (edited) Rsync is your answer. The list of options are very long And in greek. According to the man pages it looks like I'll have to first copy the files to a local directory then upload them. Note that in all cases (other than listing) at least one of the source and destination paths must be local. scp looks like what I'm looking for but the man page is sparse and doesnt provide any example scripts, which is basically what I'm looking for. I was hoping someone with some experience would provide an example. Edited April 14, 2004 by sttroopers Quote Link to comment Share on other sites More sharing options...
Qchem Posted April 15, 2004 Report Share Posted April 15, 2004 Assuming sshd is set up correctly: scp me@serverA:files/*.log me@serverB:files/ should do it, although I've only ever tried between a remote and my local machine. HTH Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.