OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: tre4bax on November 24, 2022, 11:02:43 AM

Title: Full Disk Image
Post by: tre4bax on November 24, 2022, 11:02:43 AM
Having come close to having no router I wanted to make an image backup onto a duplicate disk so that if I do get a permanent disk failure I can just plug the spare in.  I have an identical SSD in a USB adapter to which I could copy the disk.  My knowledge of FreeBSD is very basic though and I cannot figure out how to actually use DD to achieve the image I want, I can't even figure out the commands to see whether the USB is actually visible to the OS.

Is there an easier way to do this or any tutorials somewhere that could help me achieve this.
Title: Re: Full Disk Image
Post by: Patrick M. Hausen on November 24, 2022, 11:05:12 AM
Plugin the USB drive, then post the output of "camcontrol devlist", please.
Title: Re: Full Disk Image
Post by: tre4bax on November 24, 2022, 11:24:08 AM
hi Pmhausen


root@xxxxxxx:/var/run # camcontrol devlist
<InM2246S3/128G Q0707A>            at scbus0 target 0 lun 0 (ada0,pass0)
<ASMedia USB 3.0 Device 0>         at scbus1 target 0 lun 0 (pass1,da0)
Title: Re: Full Disk Image
Post by: Patrick M. Hausen on November 24, 2022, 11:27:47 AM
dd if=/dev/ada0 of=/dev/da0 bs=1m
Title: Re: Full Disk Image
Post by: tre4bax on November 24, 2022, 11:41:14 AM
awesome, thank you so much. I was missing the camcontrol devlist command to figure out the target.  I have cut and pasted that in and set it off :-)