Recovery with a backup file

Started by tdalej, July 18, 2026, 05:51:14 PM

Previous topic - Next topic
I'm doing some poking, and I have to identical servers for firewalls -- MAC addresses are different of course.
Last time I did a recovery from one to the other, restoring the backup caused all sort of fun because the MAC addresses don't align.

Is it an accepted practice to edit the backup to alter the MAC addresses first?
Is there a more elegant way to handle the MAC address changes that I'm just missing?


Have a look at this topic : https://forum.opnsense.org/index.php?topic=51075.msg261489#msg261489

Maybe it applies to your situation :)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Sort of. 

I'm trying to the recovery with the importer script to see how it gets handled there compared to manual restore.

I can't get the importer to mount the second USB device -- both the boot USB device and the second fat formatted USB device show up as da0 and da1, an it fails to mount with an "invalid device" message. 




Got the mount solved. 

I have never used the importer script before, always just bulled through manually transferring configurations when needed.
In this case I have two identical Supermicro X10SLH-N6-ST031F (that used to be used for separate locations) that I am going to use one as primary and one as backup.


OK, this is kicking my butt over here.
I should be able to an install, shut down and insert a FAT formatted USB device with a directory named CONF containing a backup file named config.xml and on the next boot up the config.xml should be recovered in the /conf/config.xml folder on the running system, right?

Why is this not working with 26.7?

I installed using the OPNsense-26.7-vga-amd64.img file on USB.
The installation works fine, I just can't seem to make the restore magic happen. 

I know the USB device is seen, I can see the device listed during the boot up sequence.

can't remember exactly but can you try with the backup config in the root of the usb device instead of being in /conf/
I think I remember that the importer will look only in the root.

Nope, neither location works. 
I punted and manually copied the config.xml in place. 

BTW, if you boot up off the installer it prompts to do the importer thing -- which works and will read the config file for restore -- but then you get no installer function.
So, if you boot up with no installation on the hardware, you can run that way ... but no way to do it without both the installer and the device used to carry the restore config file.

When I forget this next week and have to look this up:

1. Run the installer and install to local storage.
2. power off
3. boot up
4. log in
5. drop to a shell (Option 8 on the menu)
6. Plug in the device with the FAT formatted partition with the config.xml backup
7. identify the device with the ( I did this with the console messages for USB device discovery - they show up on the console)
8. fdisk -l /dev/<your dev>  to show the partitions
9. mount the FAT partition to /mnt -- mount -t msdos /dev/da0s1 /mnt
10. cd /conf
11. I made a copy of the  current config.xml just for grins -- there is a backup directory in /conf
12. copy the backup into place:  cp /mnt/config.xml .
13. exit the shell
14. reboot from the menu - option 6

On reboot your old configuration should be present.