Skip navigation
This discussion is archived

rsync command line to optain a bootable snow leopard clone

5416 Views 6 Replies Latest reply: Oct 26, 2009 12:22 PM by Dominique Buenzli RSS
Dominique Buenzli Calculating status...
Currently Being Moderated
Oct 15, 2009 8:10 AM
Hello,
I want to do a bootable clone of my snow leopard system on an external hard drive. I am doing this from a shell script as I am doing other things via the script before.

To accomplish this I am using rsync 3.0.6.

Here is the command I am using: (from http://www.bombich.com/mactips/image.html )

sudo rsync -xrlptgoEv --progress --delete / /Volumes/Backup

But the resulted clone won't boot at all (blue screen) What am I doing wrong ?

Should I add something to the command line ?
Also, do you know which folders I should exclude from the backup ?

Thanks for your answers
MacPro 1,1
  • Tony T1 Level 6 Level 6 (8,125 points)
    Did you Bless the System Folder after the Clone?

    sudo bless --folder "/Volumes/Clone of Macintosh HD/System/Library/CoreServices"


    I use the following rsync options:

    /usr/local/bin/rsync -aNHAXv --one-file-system --fileflags --force-change --delete
    --exclude='.Spotlight-V100' --exclude='/.fseventsd' --exclude='/Volumes/*'
    --exclude='/private/var/vm/*' --exclude='/private/tmp/*'
    --human-readable --stats --progress "$source" "$destination"


    You may need to compile rsync 3.0.6 as follows (see: also http://discussions.apple.com/message.jspa?messageID=10383609#10383609 )


    Follow these instructions in Terminal on both the client and server to
    download and compile rsync 3.0.?:

    Download and unarchive rsync and its patches
    Move patches directory to rsync-3.0.?
    cd rsync-3.0.?

    Apply patches relevant to preserving Mac OS X metadata
    patch -p1 <patches/fileflags.diff
    patch -p1 <patches/crtimes.diff

    Configure, make, install
    (note: creation times are not preserved in x64, so…)
    ./prepare-source
    CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure
    CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 make
    sudo make install

    Verify your installation
    rsync --version

    By default, rsync will be installed in /usr/local/bin. If that isn't
    in your path, you will need to call your new version of rsync by its
    absolute path (/usr/local/bin/rsync).


    Also, be aware that rsync 3.0.6 does properly not handle the metadata for the new HFS+ filesystem compression.

    Sub-test: creation time ... ok
    Verifying: hfs-compression ...
    Sub-test: decmpfs xattr ... not preserved
    Sub-test: UF_COMPRESSED flag ... not set
    Sub-test: file contents ... match
    Sub-test: creation time ... ok
    Sub-test: modification time ... ok
    Sub-test: hard link inode ... ok
    Sub-test: hard link decmpfs xattr ... not preserved
    Sub-test: hard link UF_COMPRESSED flag ... not set
    Sub-test: hard link modification time ... ok
    ok
    Verifying: hfs-compression_large ...
    Sub-test: decmpfs xattr ... not preserved
    Sub-test: UF_COMPRESSED flag ... not set
    Sub-test: file contents ... match
    Sub-test: creation time ... ok
    Sub-test: modification time ... ok
    Sub-test: hard link inode ... ok
    Sub-test: hard link decmpfs xattr ... not preserved
    Sub-test: hard link UF_COMPRESSED flag ... not set
    Sub-test: hard link modification time ... ok
    MacBook /, Mac OS X (10.6.1), / Windows xp (Boot Camp)
  • Tony T1 Level 6 Level 6 (8,125 points)
    What are the exact implications of this ? Could this be the problem ?


    It won't be the problem, but System Files and some App's will have incorrect MetaData. CCC says that it handles this correctly. (Hopefully rsync will be updated soon)

    For a good explanation, see: http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/3

    One thought, if you ⌘I the clone, do you have "Ignore ownership on this volume" Unchecked?
    MacBook /, Mac OS X (10.6.1), / Windows xp (Boot Camp)
  • Tony T1 Level 6 Level 6 (8,125 points)
    Is there a command line to uncheck "ignore ownership on this volume" ?
    Just to be sure that it is all the time the case (if I change external hard disk for instance).


    vsdbutil -d /Volumes/Clone of Macintosh HD

    however, please note that the vsdbutil command is deprecated.

    Here's a script that will test it:

    /usr/sbin/vsdbutil -c /Volumes/Clone of Macintosh HD | grep -sq "enabled"
    if [ $? -ne 0 ] ; then
    echo -e \aPermissions on /Volumes/Clone of Macintosh HD are disabled.
    \nUncheck 'Ignore ownership on this volume' for /Volumes/Clone of Macintosh HD
    exit 1
    fi


    And the Man Page:
    VSDBUTIL(8) BSD System Manager's Manual VSDBUTIL(8)

    NAME
    vsdbutil -- manipulates the volume status DB.

    SYNOPSIS
    vsdbutil [-a -path]

    vsdbutil [-c -path] [-d -path] [-i]

    vsdbutil [-h]

    DESCRIPTION
    vsdbutil manipulates the volume status DB. The following options are
    available:

    -a adopts (activates) on-disk ownership on the specified path

    -c checks the status of the ownership usage on the specified path

    -d disowns (deactivates) the on-disk ownership on the specified
    path

    -i initializes the ownership database to include all mounted HFS+
    volumes

    -h prints out a simple help message

    The vsdbutil command is deprecated.

    FILES
    /var/db/volinfo.database Database of volumes managed
    via vsdbutil.

    SEE ALSO
    diskutil(8), mount(8)

    Darwin December 19, 2001 Darwin
    MacBook /, Mac OS X (10.6.1), / Windows xp (Boot Camp)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.