AppleScript To Backup To External HD

Discussion in 'Mac Programming' started by ncmason, Mar 8, 2007.

  1. macrumors regular

    ncmason

    Joined:
    Feb 27, 2007
    #1
    Can someone please give me an AppleScript that will backup my Home folder onto a backup folder I made on my External HD?


    Thanks,
    Mason
     
  2. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
  3. thread starter macrumors regular

    ncmason

    Joined:
    Feb 27, 2007
    #3
    Carbon Copy Cloner

    I have used CCC before and really didn't have a great experience with it. Do you know of any other solutions besides CCC? I would like it to atleast be an AppleScript.


    Thanks again,
    Mason
     
  4. macrumors 6502

    chriscorbin

    Joined:
    Feb 17, 2007
    Location:
    Vallejo, CA
    #4
    try Super Duper
     
  5. macrumors 65816

    cbrain

    Joined:
    Dec 9, 2006
    Location:
    North-East, UK
    #5
    I use Intego Personal Backup X4. It does exactly what you described.
     
  6. macrumors member

    Joined:
    Mar 15, 2004
    #6
    rsync

    You don't need an Apple Script, OS X comes with an old command line utility called rsync. For a really basic backup, just run "rsync -a /Users/username /Volumes/externalharddrivename/" in your terminal.

    Note the lack of a trailing / on the first path, this is important. A trailing / means "the contents of" rather than the folder itself. So with a trailing /, all of the contents of your home folder would be dumped onto the root of the external hard drive, without a copy of the folder itself.

    Run the same command again, and only the files that have changed will be moved. By default, files you've deleted in your home folder will not be removed from the backup, add "--delete" right after the "-a" if you want deleted files to be removed from your home folder. rsync is very powerful, if you want more information, run "man rsync" in your terminal.
     
  7. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #7
    Just use rsync

    It's trivial. Just one line.

    But don't copy your data to an external drive use "rsync". It will copy over only the files that have changed since the last time you sync'd. It will go much faster. It is the one line script:

    Of course you need to replace "username" and "mydisk" with real names. If you want to automate this to run say ever night then you can give the name of your backup script to "crontab".

    For more info, from the terminal type "man rsync" and "man crontab". If you read up you will see that rsync is pretty smart and can "sync" data over a network or across the Internet if you ask it to. But going to an external drive is easy.
     
  8. macrumors newbie

    Joined:
    Mar 20, 2007
    #8
    MyRsyncBackup 0.1

    Rsync indeed is a very reliable solution - try my AppleScript as frontend for rsync. It's nice cause you can output stats to growl.
    Use it in combination with "Do something when". Just follow the instructions on my page.

    http://www.niquille.com/2007/03/13/applescript-rsync-hotplug-backup-v01/

    Hope that helps.

    PS. I'm working on a more sophisticated version which should be easier to handel..
     

Share This Page