APFS Disk Image writing and restoring keeps failing.
I'm trying to make an APFS volume into a disk image, and be able to write the disk image back to a blank APFS volume. My attempts keep failing.
I started by following this post's instructions:
How to Create an APFS Disk Image (especially of macOS boot drive) in Mojave? -BEST ANSWER
condensed quote:
smayer97
I FOUND THE ONLY CURRENT SOLUTION using Apple Disk Utility to create RELIABLE disk images of APFS drives. It was not easy to figure out. The ONLY path to make a viable re-usable disk image formatted as APFS is to follow these 3 steps exactly:
1. First create a blank image file formatted as APFS and Read/Write (requires pre-determining size of image file).
IMPORTANT NOTE: The image (destination) cannot be stored on the same drive or partition (source) from which you are going to create the image.
2. use Restore from <volume> to clone to newly created image file
(Highlight destination <volume> then click [Restore] button and select Restore From <volume>.
3. convert image file to Compressed format (Image > Convert).
ONLY THEN do you have a reliable APFS image, especially w/bootable macOS. I have done this repeatedly and it works fine.
ANY other options/paths, are greyed out, yield "Resource busy" or "image is not APFS format" errors or produces image that is not reliable. Even using Apple Internet Recovery tools/boot was the same.
NOTES:
1. you do NOT need to do ANY of this using Recovery tools. You can do this from a live boot of macOS drive.
2. If you do not have a destination to store the image file other than the same internal drive, you can create a partition large enough to store the image file, using Disk Utility. And yes, you can partition macOS boot drive live.
CAVEAT: Tested only using Mojave 10.14.4 on 2019 27" i9 iMac w 40GB RAM and 512GB SSD (no T2 chip) using Disk Utility 18.0, so YMMV.
When I try it:
Step1: My source is 11.8G, so I create a 12G blank image. (8 minutes later) = OK
Step2: Mount blank image. Selected mounted image in Disk Utility. Hit restore. Selected source drive. Clicked Restore. = FAIL. (see image)
-Since the error suggested my 12G mounted image was "too small", I repeated above with a new 24G, and 36G mounted images and got the same error. = FAIL
-I tried selecting the container instead of the volume and got the same error. = FAIL
-I tried selecting the disk (of the image), but then the restore sources are limited to literal Physical Drives. = FAIL
What did I do wrong, or what's a better method?
Thanks
MacBook Pro 17″