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″

Posted on Nov 20, 2023 1:47 PM

Reply

Similar questions

4 replies

Nov 21, 2023 8:40 AM in response to MartinR

I have both CCC and SuperDuper. I have used SD for years to make bootable volume backups (not images yet). However, I started trying SD for write/restore images yesterday when I couldn't get Disk Utility to cooperate, and I was getting errors when restoring the images back to their original volumes. I'm currently repeating my tests in a more methodical fashion, including CCC next. But it sure seems like there should be a simpler Apple/DiskUtility solution.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

APFS Disk Image writing and restoring keeps failing.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.