Automated backup download?

HI,

I want to write an applescript that runs once a day on my local computer via cron. I want it to log in to a remote server, find a file based on the date (the filename is name something like ‘myfile-thisYear-thisMonth-thisDay.tar.gz’), and download the file to the local machine.

I don’t know where to start with this…can anyone assist me? Thanks very much!

Hi Jsocks

Heres a few ideas to point you in the right direction!!
this may be based on which version of osx your using but i think its “launchd” and not “cron” which you need to be looking into
to trigger the script daily although i guess cron will still do it!! best if you check this out!!

to mount a remote volume you will need to use something like this:

mount volume "afp://user:password@194.158.8.25/VolumeName/"

just fill in your correct details.

has for finding the file your after its exactly as if you were finding a file on your local machine. my advice would be not to search the whole
mac cause it would take a while and theres more chance of an error. so best if you have some idea of where it will be.

has for finding the file by name then you just need to concenate its name together with a date string etc.
heres a little example not necessary the way to go but just an idea.

set {d, m, y} to {day, month, year} of (current date)
set the_date to d & space & m & space & y as string

i hope this helps
good luck