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
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.