Automated FTP download

Discussion in 'Mac Programming' started by Nial, Mar 4, 2009.

  1. macrumors newbie

    Dec 11, 2007
    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 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).

  2. macrumors 68020


    Sep 8, 2003
    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.
  3. Moderator emeritus


    Aug 16, 2005
    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. 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 that essentially allows you to bookmark common command line commands. And I just run that once a day to get any updates.

Share This Page