Slashdot Mirror


Backup Solutions for Mac OS X?

SpartanVII asks: "I purchased a Mac roughly two years ago and have made the switch with a fair amount of ease. However, one thing that has troubled me is how best to backup my important data to an external hard drive. Right now, I have rigged up an Automator workflow that runs every night, but I have also seen software options like SuperDuper and Knox. Since the Automator workflow lacks much of the flexibility and features available with these apps, I am ready to try something else. What app have you come across that provides the best backup solution?"

2 of 125 comments (clear)

  1. Re:rsync, bash script, calendar event by xil · · Score: 5, Informative

    On OS X, rsync -E will copy resource forks and extended attributes. Works fine for backup.

  2. Re:rsync, bash script, calendar event by iangoldby · · Score: 5, Interesting
    Here's my script. This is an amalgamation of several ideas that I easily found by searching the web. It keeps the last three copies, using links to avoid copying or storing twice any file that hasn't changed.

    #!/bin/sh
     
    # To use Apple's rsync switch commented lines below
    # To use rsyncx:
    # RSYNC=/usr/local/bin/rsync --eahfs --showtogo
    # To use built-in rsync (OS X 10.4 and later):
    RSYNC="/usr/bin/rsync -E -v"
     
    DEST=/Volumes/Backups
     
    # Function for toggling Spotlight indexing
    spotlight_switch()
    {
    /usr/bin/mdutil -i $1 /
    # /usr/bin/mdutil -i $1 /Volumes/Backups
    }
     
    # sudo runs the backup as root
    # --eahfs enables HFS+ mode
    # -a turns on archive mode (recursive copy + retain attributes)
    # -x don't cross device boundaries (ignore mounted volumes)
    # -S handle sparse files efficiently
    # --showtogo shows the number of files left to process
    # --delete deletes any files that have been deleted locally
    # $* expands to any extra command line options you may give
     
    # make sure we're running as root
    # id options are effective (u)ser ID
    if (( `id -u` != 0 )); then
    { echo "Sorry, must be root. Exiting..."; exit; }
    fi;
     
    ! test -d $DEST && echo "Please mount the backup drive!" && exit
    spotlight_switch off
     
    rm -rf $DEST/backup.2
    mv $DEST/backup.1 $DEST/backup.2
    mv $DEST/backup $DEST/backup.1
     
    $RSYNC -a -x -S --delete --link-dest=../backup.1 \
        --exclude-from backup_excludes.txt $* / /Volumes/Backups/backup
     
    # make the backup bootable - comment this out if needed
     
    bless -folder $DEST/backup/System/Library/CoreServices
     
    spotli ght_switch on
    My excludes file:

    /tmp/*
    /Network/*
    /cores/*
    */.Trash
    /afs/*
    /a utomount/*
    /private/tmp/*
    /private/var/run/*
    /p rivate/var/spool/postfix/*
    /private/var/vm/*
    /Pr evious Systems.localized
    .Spotlight-*/
    /Users/*/Library /Caches
    The only 'issue' is that I don't seem to be able to boot from the backup, but this may be no bad thing, given that a backup is not supposed to be a mirror, nor a mirror a backup.

    Any suggestions (or flames as to why my backup strategy will fail catastrophically) welcomed!

    [[Your comment has too few characters per line (currently 25.1). Aenean orci mi, lacinia varius, varius in, suscipit ut, purus. Donec pharetra lorem nec odio. Mauris accumsan sem non pede. Etiam pulvinar eros at massa. Curabitur consectetuer. Pellentesque imperdiet cursus diam. Sed tincidunt nunc. Donec fermentum, nisl at hendrerit mollis, turpis leo consequat elit, volutpat condimentum velit augue facilisis nisl. Vestibulum dapibus ligula non turpis. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla risus lorem, aliquet imperdiet, accumsan id, aliquet vel, tellus. Quisque mi dui, pulvinar ut, iaculis pharetra, rutrum eget, nisl. Aliquam et erat in sem dapibus vehicula. Curabitur rhoncus ipsum id dui. Nullam venenatis. Phasellus vitae sapien quis pede ultrices mollis.]]