littleIdiot
MIS
Hi,
Due to networking issues, I am having to do an ftp 'hop' to move data from one location to another, via an intermediary.
i.e. location A contains original data, and I need to move it to location C:
ftp data from loc.A to loc.B, then ftp from loc.B to loc. C
I can do all work from location B - so 'get' the data from loc.A first, then 'put' the data to loc. C.
I am trying to work out a way to do this in a smart way. At the moment, I set off one ftp, leave it running over night (I'm moving several GB's at a time), then the next day, set off the second ftp. I use mget and mput, with prompt turned off.
Is it possible to script this somehow? someone suggested cron jobs, but I have ZERO experience of this.
I was thinking of some sort of script that would do the ftp for me, so I can have:
But I have no idea how to force ftp commands out from a script, and how to do any error checking.
Any tips, ideas or previsoue useful posts appreciated.
Thanks,
littleIdiot
Due to networking issues, I am having to do an ftp 'hop' to move data from one location to another, via an intermediary.
i.e. location A contains original data, and I need to move it to location C:
ftp data from loc.A to loc.B, then ftp from loc.B to loc. C
I can do all work from location B - so 'get' the data from loc.A first, then 'put' the data to loc. C.
I am trying to work out a way to do this in a smart way. At the moment, I set off one ftp, leave it running over night (I'm moving several GB's at a time), then the next day, set off the second ftp. I use mget and mput, with prompt turned off.
Is it possible to script this somehow? someone suggested cron jobs, but I have ZERO experience of this.
I was thinking of some sort of script that would do the ftp for me, so I can have:
Code:
' Do ftp get part
cd /dir/dir
ftp locationA
[p/word here]
cd /dir/dir
prompt
hash
bin
mget *
close
' Do ftp put part
ftp locationC
[p/word here]
cd /dir/dir
mput *
close
But I have no idea how to force ftp commands out from a script, and how to do any error checking.
Any tips, ideas or previsoue useful posts appreciated.
Thanks,
littleIdiot