You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

FYI: Restoring an APFS Container from a disk image

Having created a disk image of an APFS Container on an external drive using the Disk Utility (Image from "Container disk", encrypted and stored with the "compressed" option (the readonly option should also work)), I could not initially retrieve the contents by using the Disk Utility.


Here are the steps that I used to restore the APFS volumes. Take note that the target drive is completely erased.


1) Generate a checksum (equivalent to "Scan for restore" using the Disk Utility):

2) Restore the APFS Container:

Below is a screenshot of the Disk Utility showing that the APFS volume group has been properly restored:

The DMG file used as input was quite large (141GB):

Here is a screenshot of the DMG contents (when mounted):

Hope this helps anyone else who comes across this issue.


- Pie Lover

Posted on Mar 22, 2022 9:57 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 24, 2022 8:40 AM

The Terminal command hdiutil can be used as an alternative to using the Disk Utility to create disk images. For example:


hdiutil create -encryption AES-256 -srcdevice /dev/disk3 /Volumes/External\ SSD/Monterey\ backup


Booting into Recovery and launching Terminal, I was able to use the above command to create a disk image of the APFS Container on the internal drive (see below). Note that all volumes of the APFS Container must first be unmounted.


- Pie Lover




Similar questions

1 reply
Question marked as Top-ranking reply

Mar 24, 2022 8:40 AM in response to BlueberryLover

The Terminal command hdiutil can be used as an alternative to using the Disk Utility to create disk images. For example:


hdiutil create -encryption AES-256 -srcdevice /dev/disk3 /Volumes/External\ SSD/Monterey\ backup


Booting into Recovery and launching Terminal, I was able to use the above command to create a disk image of the APFS Container on the internal drive (see below). Note that all volumes of the APFS Container must first be unmounted.


- Pie Lover




FYI: Restoring an APFS Container from a disk image

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