How to build an APFS bootable clone in Terminal

One of the great challenges with the switch to Apple’s new APFS file system has been building bootable clones of the startup disk using commands in Terminal. The folk at Belight have just published details of how to do this.

I won’t steal their thunder by revealing their steps in detail, but the sequence involves:

  1. in Mojave, ensuring Terminal has Full Disk Access in Privacy;
  2. installing a more recent version of rsync to perform the cloning;
  3. creating an APFS volume on the target disk;
  4. vsdbutil to activate on-disk ownership on the target;
  5. rsync to perform the cloning;
  6. diskutil to create a new Preboot volume on the target, with the correct contents;
  7. blessing the target volume;
  8. updating dyld’s shared cache on the target.

Simple, isn’t it!

Needless to say, they’d rather that you bought a copy of their Get Backup Pro software for $19.99, which makes bootable clones without that effort, but it is egregiously generous of them to share their secret and give you the option.