1

On macOS in past years I have been able to use dd to copy an entire hard drive to another hard drive of the same size. When I did this, everything was copied: the partition map, the volumes, everything. The copied-to drive was an exact copy of the original in all details.

Yesterday I tried the same thing in macOS Big Sur. The drive I copied from is encrypted and contains only one volume, which contains Time Machine backups.

Disk Utility says this about the drive I copied from:

  • Drive model: “Seagate Desktop Media”
  • Drive subtitle: “USB External Physical Disk – GUID Partition Map”
  • Drive size: 8 TB
  • Volume: “mybackup”, formatted as “CoreStorage Logical Volume” Disk Utility lets me decrypt-then-mount the “mybackup” volume.

The shell command I used to do the copy:

time caffeinate sudo gdd if=/dev/rdisk2 of=/dev/rdisk3 bs=1024M status=progress conv=noerror,sync

That ran for 28 hours. I assume that if there were errors, gdd would have said something. It did not.

Result: Disk Utility says this about the drive I copied to:

  • Drive model: “Seagate Backup+ Hub BK Media”
  • Drive subtitle: “USB External Physical Disk – GUID Partition Map”
  • Drive size: 8 TB
  • (no volumes)

Why no volume? Is there some metadata that needs to be copied but isn’t accessible in the raw disk contents?

There is no other disk that could have been /dev/rdisk3 and the copy did not go to a plain file.

UPDATE

Later, after reinstalling the OS on an erased disk, I tried to mount the copy again, and it worked.

6
  • 1
    In my last testing, maybe a year ago, I came to the conclusion that one cannot dd a disk that's using Core Storage created under macOS as it's now currently implemented with APFS when the dd is done on a Mac. I was just getting ready to test doing the dd on the drive created under macOS from Linux to see if the results are any different. I won't know until tomorrow. Aug 21 at 13:23
  • 1
    It looks like the current Apple_CoreStorage Encrypted drive that I can sacrifice was created back in 2016, so that's a no go until I wipe it and recreate it anew. Oh well, let the process begin. Aug 21 at 13:42
  • 1
    @user3439894 I’ve linked them… there may be a couple learnings between the linked questions. I’d use asr if I had to attempt this or maybe carbon copy cloner or super duper so I could open a ticket with the developers. Using dd of some flavor will certainly teach us all some things. +1
    – bmike
    Aug 21 at 14:24
  • Carbon Copy Cloner refuses to copy because TM data is Apple-proprietary.
    – daveyost
    Aug 21 at 20:21
  • 1
    Okay, before I was going to wipe the drive I decided to image it and the result was no mountable file systems when attempting to mount the image from Finder. Using hdiutil imageinfo Encrypted.dmg I get the expected output as well as in Linux I can mount it and it shows the same layout as the physical disk. Since the image will not mount in macOS I'm not going to waste time wiping the drive and creating an APFS Apple_CoreStorage Encrypted drive. Sorry. Aug 21 at 20:27
2

you can copy TM volumes, using SuperDuper!, it takes a while (days to weeks running 24/7 for ~4tb) but it works.

I've done this to copy a standard HFS+ TM disk onto a CoreStorage Logical Volume Mac OS Extended (Journaled, Encrypted) disk, and from that disk 2 years later to another journaled encrypted disk.

You then need to go through the associatedisk stuff and inheriting the backup etc.

edit

Here's Shirt Pocket's documentation for copying a time machine volume with SuperDuper!:

https://www.shirt-pocket.com/forums/showthread.php?t=3565

Note, you need TM switched off during the copy, then you just have to have both drives mounted, and perform the copy, BUT it takes a loooong time. For example, copying from a WD Red internal SATA 3'5" to a WD Elements 2'5" portable over usb2 ~3.5TB of data - 3 weeks 24/7. Copying from that same WD Elements to a different WD Red Plus 3.5", both on USB2 ~3.5TB, 4 days 24/7, that was using a dedicated mac mini to do the job.

Once it's done, add the drive in Time Machine, but don't switch time machine automatic backups on yet.

You may need to inherit the backup, and then manually associate each of your drives with the backup, as per the Pondini instructions which you can currently find here:

http://oldtoad.net/pondini.org/TM/B6.html

  • First, do the Inherit backup step, to link the duplicated backup drive to your current system (blue instructions).
  • Then, do the Associate OSX Volume to connect your boot drive to its most recent backup (pink instructions).
  • Thirdly, associate your non-bootable data-only volumes with their most recent backups (tan instructions).

Once that's all done, you can try a manual backup, first run this command in terminal:

log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

and leave the terminal window open, it will provide a live commentary on what time machine is doing - watch the sizes of the predicted "Will Copy" for each of your backed up drives. What you're looking for is that it's only doing a incremental backup. If it says it's copying an amount that's equivalent to a whole new backup of the data, one of the above steps hasn't taken, so try them again. Or possibly your most recent backup was faulty. You can use tmutil to remove the most recent backup, and then go through the above steps again, to associate the current system and drives to the second-most-recent backup, etc.

1
  • Please add further details to expand on your answer, such as working code or documentation citations.
    – Community Bot
    Aug 28 at 18:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .