Skip to content

Instantly share code, notes, and snippets.

@sansumbrella
Created November 1, 2012 22:49
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save sansumbrella/3997241 to your computer and use it in GitHub Desktop.
Save sansumbrella/3997241 to your computer and use it in GitHub Desktop.
Sparse bundle creation for time machine on NAS.
# 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
@sansumbrella
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment