Auto Copy and Edit from one FTP to another


#1

Hey guys!
I’ve got a nice juicy problem and could use some help.

I have a Game Server hosted for me, that provides FTP access to a folder that is populated daily with an online browsable worldmap.

What I’d like to do, is set up an automatic copy of that folder to my Dreamhost Account, then edit a single file on a daily basis.

Issues: I dont have shell access to the Game Server, although I’m on good terms with my host, so could probably get basic stuff done for me.

I’m guessing it involves a cron job a shell script at the Dreamhost end, but i’ve not got much experience there…

Any help would be greatly appreciated!
Cheers!


#2

Is that FTP access anonymous? Otherwise, you will need your FTP username and password stored in plain text in a file in your account. Here’s a small tutorial on the subject:
http://www.stratigery.com/scripting.ftp.html
Instead of their “put” command, you’ll need a “get” or “mget” which will do a multiple get where you can use wildcards.


#3

Wow, thanks for that.
That should get me started…

One slight issue, I’m dealing with a bunch of subdirectories.
Apparently: “Note: mget and mput are not meant to transfer entire direc-
tory subtrees of files. That can be done by transferring a
tar(1) archive of the subtree (in binary mode).”

That might cause me an issue, as its quite a big chunk of files and folders.