View Full Version : Automated FTP download

Mar 4, 2009, 05:19 PM
Hopefully this is the right forum section to ask this question. Basically, I'm running a cron script on my web server to backup my MySQL databases (AutoMySQLBackup (http://sourceforge.net/projects/automysqlbackup/) for anyone interested).

This works fine, but I'd like to further automate the process by having my Mac attempt to download and store the files on a semi-regular basis (so that Time Machine can also kick in and start helping for a further backup).

I'm not sure if something like this could be achieved via AppleScript, or if I'd need a dedicated program. I use Transmit for FTP purposes. I'm not sure if it has an option for automated downloads (Google didn't bounce anything useful back).


Mar 4, 2009, 07:56 PM
There should be some tools that help you run commands at specified times on OS X (which uses launchd for it, and has cron-like capabilities in it). From that script you should be able to use curl to get the DB file.

Mar 4, 2009, 11:02 PM
I'm currently doing something similar for log files on my web server. At the web server I have a cron job to backup some logs. Then on my Mac I have an rsync command that will sync up with that backup and store the files locally for me. Here's the tutorial I followed for setting up the rsync command using SSH. (http://troy.jdmz.net/rsync/index.html) It was a good tutorial.

Then, since that just gives you a command, you can either save it as part of an AppleScript or, what I do is use a program called CLIX (http://www.apple.com/downloads/macosx/unix_open_source/clix.html) that essentially allows you to bookmark common command line commands. And I just run that once a day to get any updates.