Mac – Creating an image from a Time Machine backup – “Operation Cancelled”

backupdisk-utilitytime-machine

I want to convert an existing Time Machine backup (on an external HDD, encrypted) to a read-only archival image.

I open Disk Utility and choose File » New Image » Image from Backup, which lets me choose the destination. The destination is an ExFAT file system.

The options are the default (read-only, unencrypted), and when I start the process, after a few seconds, I get this:

I haven't cancelled the operation myself — Disk Utility did it. What I've tried so far:

  • Choosing another output option (compressed or CD/DVD master, for example), but that didn't help.
  • Unmounting the volume before starting the process
  • Time Machine is off; no automatic backups are being created.
  • Copying the Backups.backupdb folder is impossible because it contains hard links that ExFAT cannot read, and Finder says "The volume is the wrong format for a backup."

The same problem has been discussed here without a resolution. What I do notice is that the partition is shown as a Time Machine disk. Could this cause any problems?

Best Answer

For some reason, this only works via command line using the hdiutil tool.

First, open Disk Utility, right click the source drive (the Time Machine volume), and choose Unmount. Do not eject it!

Then, open a Terminal window, and enter:

diskutil list

You should be able to locate your volume. For example, in my case, it was listed as follows:

/dev/disk5 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Backup Apollo          +500.0 GB   disk5
                                 Logical Volume on disk4s2
                                 8577521E-D394-45A0-BB7E-26F9E19C1FE7
                                 Unlocked Encrypted

Copy the identifier, /dev/disk5. This is what we want to convert into an image.

Then, run the following command, which will create an encrypted image of the source volume:

hdiutil create /Volumes/Data/Backup.dmg -encryption -stdinpass -srcdevice /dev/disk5

Here, /Volumes/Data/Backup.dmg is the target file. Change it according to your needs.

You need to use sudo to run this command (left out for security reasons), so when you're sure it's correct, run sudo hdiutil create ….

After hitting Enter, you will be asked for an encryption password. This takes a while, but it works:

Elapsed Time:  7h 15m 52.227s
File size: 293424025874 bytes, Checksum: CRC32 $753B4175
Sectors processed: 976562496, 968645649 compressed
Speed: 18.1Mbytes/sec
Savings: 41.3%
created: /Volumes/Data/Backup.dmg

For more options, run man hdiutil.