Skip to content

Instantly share code, notes, and snippets.

@GrahamWalters
Created December 17, 2020 12:47
Show Gist options
  • Save GrahamWalters/e2caeeef2fbdc0b0875b6c5448dc91c6 to your computer and use it in GitHub Desktop.
Save GrahamWalters/e2caeeef2fbdc0b0875b6c5448dc91c6 to your computer and use it in GitHub Desktop.
TimeMachine backup on APFS Volume
# Create a Journaled HFS+ disk image on the drive
# Size is limited to 250GB but you can change that
# Volume name is TM
# The image name is TimeMachine
# Note this image is not encrypted. Save this image to an encrypted volume.
hdiutil create -size 250gb -layout GPTSPUD -fs "Journaled HFS+" -volname "TM" -type SPARSEBUNDLE -nospotlight -tgtimagekey sparse-band-size=262144 /Volumes/T7/TimeMachine.sparsebundle
# Mount the disk image and then set TimeMachine to use the new disk
sudo tmutil setdestination /Volumes/TM/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment