Automagic Download

S

(Shovel)

Guest
Howdy.

Right, my webhost makes a nightly backup of my website. I'd like to set Task Scheduler to automatically download a backup every day.

This requires logging into my ftp and downloading a uniquely name file (the name is assembled from the date).

Now, I recon this could be done using a batch file of some sort, then running the batch file at a specified time.

However, the "how" is missing.

Can anyone recommend what I'd need to do to get this completely automated? Bearing in mind that I don't want to be prompted for anything, just for it to do it quietly in the background.
 
W

Will

Guest
I could do it on *nix for you, I've got a shell script to do something very similar. If you are stuck, I can do you a shell on my FreeBSD box to do the job for you, and if you have a static IP, I could put it on your box too via FTP.
 
S

(Shovel)

Guest
Originally posted by Will.
I could do it on *nix for you, I've got a shell script to do something very similar. If you are stuck, I can do you a shell on my FreeBSD box to do the job for you, and if you have a static IP, I could put it on your box too via FTP.

Indeed, though I've never done any, it sounds like something that nix would excel at - and windows would not.

Sadly, I've not got a static IP so as much as I'd love the easy option (Homer Simpson: "Why can't someone else do it"), I think I will have to keep trying.

Out of curiosity, what would such a script look like?

I might be able to translate it into Perl and run that to do it :)

*goes and downloads Perl*
 
S

(Shovel)

Guest
Arrgh.

Contrary to my memory, the backup isn't accessible from the FTP, only from the CPanel powered admin pages.

This can probably still be done through Perl - I think - It's just that getting it to work with password protected HTTP connections is more complex than FTP connections (which, annoyingly, I had got working before I discovered my error of memory).

Ah well...
 
W

Will

Guest
Code:
#!/usr/local/bin/bash

# this script should upload my channel logs to the webserver

cd /usr/home/will
ftp -in <<EOF
usr green [i]password[/i]
cd [url]www.will.me.uk/irc/[/url]
ascii
put [i]stuff[/i]
quit
EOF
Something like that.
 

Users who are viewing this thread

Top Bottom