1

I work in a Mac environment with several Mac minis in the same network. I've a script which I run through Jenkins and this script creates a snapshot (.dmg) of a Mac mini of my choice and saves the snapshot.dmg to a Network Attached Storage (NAS). Everything works fine till here. But now I would like to use the snapshot.dmg and restore it on one of the Mac mini through a script/command line. Can some one tell me how to do this?

I'm aware of the process through GUI, I would like to restore the snapshot.dmg on a Mac mini completely through a script/terminal.

My effort: I've tried using terminal commands such as hdiutil and asr to restore the image but I guess I'm missing something.

So, I've Mac mini A, Mac mini B and a NAS all connected to the same network. I'm trying to restore Mac mini A with snapshot.dmg,located on NAS, with the help of Mac mini B. I've tried running the below command from Mac mini B.

asr restore --source /Volumes/Public/macmini.dmg --target /Volumes/Mac\ OS --erase

The problem is, I'm unable to set the right target.

  • You can't erase Mac mini A, provided it's booted to its default system volume. It would have to delete/erase itself - but maybe I didn't get the problem correctly... Maybe you have to add some more details... – klanomath Oct 13 '16 at 16:12
  • Right, you can't erase the boot drive. But if you have another partition or disk you can use that as the target and then reboot from it afterwards... – MacManager Oct 13 '16 at 18:40

You must log in to answer this question.

Browse other questions tagged .