Skip to content

Instantly share code, notes, and snippets.

@kiwiroy
Forked from sansumbrella/create-sparsebundle.sh
Created October 27, 2013 19:56
Show Gist options
  • Save kiwiroy/7187218 to your computer and use it in GitHub Desktop.
Save kiwiroy/7187218 to your computer and use it in GitHub Desktop.
# creates a sparsebundle disk image with a 128MB band size
MACHINE_NAME=your-machine-name
echo $MACHINE_NAME
hdiutil create -size 900g -type SPARSEBUNDLE -nospotlight -volname "Backup of $MACHINE_NAME" -fs "Case-sensitive Journaled HFS+" -imagekey sparse-band-size=262144 -verbose ./$MACHINE_NAME.sparsebundle
# copy the plists from TIME_MACHINE_IMAGE to NEW_IMAGE
TIME_MACHINE_IMAGE=your-machine-name.old.sparsebundle
NEW_IMAGE=your-machine-name.sparsebundle
cp $TIME_MACHINE_IMAGE/com.apple.TimeMachine.*.plist $NEW_IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment