Home > Questions

How to restore an APFS container from a disk image on Mac?

I used Disk Utility to create a disk image of my Mac's APFS container with encryption and compression and saved it to my external SSD. Now, I want to restore the 141GB disk image to my external drive. How can I do it? P.S. I've already erase the destination drive where I want to restore the APFS container to.

Best Answered by

iBoysoft author Jenny Zeng

Jenny Zeng

Answered on Monday, February 19, 2024

You can restore the disk image to your external disk with the following steps:

  1. Ensure you're logged in with the administrator account.
  2. Open Terminal.
  3. Type the following command and hit Enter to generate a checksum:sudo asr imagescan --source dmg_path --filechecksumTo get the dmg path, simply drag and drop the dmg into Terminal. An example of the command would be: sudo asr imagescan /Volumes/Ventura\ encrypted.dmg --filechecksum
  4. Type your password and hit Enter.
  5. Run the following command to get the disk identifier of the destination disk (e.g., disk2).diskutil list
  6. Restore the APFS container.sudo asr restore --source dmg_path --target /dev/disk_identifier --eraseFor instance, sudo asr restore -source /Volumes/Ventura\ encrypted.dmg --target /dev/disk3 --erase

After a few seconds, the restore should complete successfuly.

 

 

 

People Also Ask

Read More Questions

Read More Advice From iBoysoft's Computer Experts

Mac Cloning Software

Best 5 Mac Cloning Software For Mac Hard Drive & OS Backup

Mac cloning software allows you to create a disk image or a replica of your Mac hard drive or an external hard drive to another disk.

How to Tips

MacでUSBドライブをクローンする

(2024 ガイド)MacでUSBドライブをクローンする方法

この投稿では、MacでUSBドライブをクローンするためのステップバイステップの方法を提供します。Mac用のサードパーティのディスククローニングソフトウェアを使用するかどうかに関係なく、USBフラッシュドライブや他の外部ディスクをクローンすることができます。

comment sauvegarder les photos d'un Mac sur un disque dur externe

Comment sauvegarder les photos sur un Mac sur un disque dur externe ?

Si vous avez beaucoup de photos sur un Mac qui doivent être sauvegardées sur un disque dur externe, comment pouvez-vous accomplir cette tâche rapidement et sans en oublier ? Ne vous inquiétez pas, cet article vous guide pour y parvenir facilement.