What if you have a local hard disk being used as a Time Machine backup, and you want to move it to a server, to encrypt it, or otherwise make it more easily moveable? However, you'd like to continue to use it as a Time Machine backup store without losing your history.
One way to achieve this seems to be to copy the Time Machine hard disk to a disk image (optionally encrypted), which can then be copied, moved around, and used for continuing Time Machine backups.
It is done in three steps in the terminal:
Assume the source hard disk is named TimeMachine (size 370GB), the computer is named MyMac, and you want to create the image in /Volumes/NewTimeMachine (another disk). The commands would look like this:
$ mkBackupImage.sh -p /Volumes/NewTimeMachine -s 370g
% open MyMac.sparsebundle
% sudo asr --source /Volumes/TimeMachine --target /Volumes/Time Machine Backups/ --erase
Caution: Make sure your asr copy is done by block copy (not file copy). See man asr for help with this.
Testing: I have tried this in a minor way. I created a Time Machine backup, backed up to it a few times, followed the above hint, and then shifted Time Machine to back up to the NewTimeMachine disk. Time Machine will mount the disk image, and back up to it.
Bugs: When restoring from the image, one has to (1) mount the image (open the image file in the Finder), (2) Control-click the Time Machine icon in the dock, and (3) pick 'Browse other time machine disks...' from the contextual menu.
One way to achieve this seems to be to copy the Time Machine hard disk to a disk image (optionally encrypted), which can then be copied, moved around, and used for continuing Time Machine backups.
It is done in three steps in the terminal:
- Create an image (optionally encrypted) of the same size as the Time Machine hard disk. You can use the script from this hint, or simply copy and execute the relevant parts of it. With the script, the command would look something like this:
mkBackupImage.sh -p /path/to/disk/image -s nnn
Replace the nnn with the size of the original Time Machine disk (and replace the path bit, too). - Mount the new image:
open /path/to/disk/image
- Use asr to make a block copy of the hard disk to the image:
sudo asr --source /Volumes/TM_backup --target /Volumes/mounted_image_name --erase
Assume the source hard disk is named TimeMachine (size 370GB), the computer is named MyMac, and you want to create the image in /Volumes/NewTimeMachine (another disk). The commands would look like this:
$ mkBackupImage.sh -p /Volumes/NewTimeMachine -s 370g
% open MyMac.sparsebundle
% sudo asr --source /Volumes/TimeMachine --target /Volumes/Time Machine Backups/ --erase
Caution: Make sure your asr copy is done by block copy (not file copy). See man asr for help with this.
Testing: I have tried this in a minor way. I created a Time Machine backup, backed up to it a few times, followed the above hint, and then shifted Time Machine to back up to the NewTimeMachine disk. Time Machine will mount the disk image, and back up to it.
Bugs: When restoring from the image, one has to (1) mount the image (open the image file in the Finder), (2) Control-click the Time Machine icon in the dock, and (3) pick 'Browse other time machine disks...' from the contextual menu.
•
[9,970 views]

