OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: RouterGuy2019 on December 26, 2024, 06:39:36 PM

Title: Quick Question about moving to new hardware?
Post by: RouterGuy2019 on December 26, 2024, 06:39:36 PM
I am wondering if I move to new hardware, can I backup my current opnsense system and restore it on the new hardware, or will that not work because the hardware it different?
Title: Re: Quick Question about moving to new hardware?
Post by: cguilford on December 26, 2024, 07:35:06 PM
You should be able to do a backup which backs up the config information and restore it to the new hardware once you have Opnsense installed.
Title: Re: Quick Question about moving to new hardware?
Post by: dseven on December 26, 2024, 10:22:07 PM
Probably the most likely thing that will not match is the NIC devices, unless you choose something with the same type of NICs. You might be able to get away with editing the XML file before restoring on the new box (after figuring out what the NIC devices will be).
Title: Re: Quick Question about moving to new hardware?
Post by: EricPerl on December 26, 2024, 11:47:20 PM
It's pretty likely that the NICs will have different names on the new system, but it's not that difficult to edit the config.xml file before import.
Finding out what you need to replace the old names with will likely require running the installation until you get to doing manual interface assignments.
You might actually need to finish the install if the mapping between physical ports and device names is not straightforward (if you have more than 2 ports and care which ones are to be used).

You can actually import more than just the config.xml if you'd like.
Some details here: https://forum.opnsense.org/index.php?topic=44276 (https://forum.opnsense.org/index.php?topic=44276)
On bare metal, you'd want the ISO on a 2nd USB stick.
Title: Re: Quick Question about moving to new hardware?
Post by: RouterGuy2019 on December 27, 2024, 12:47:39 AM
Thanks to everyone that replied, this is kind of what I suspected was that the NIC's would identify differently and I would have to manually edit the .xml file, but I was hoping there was an easier way.  I will give it a go and report back when I get a chance to try it.
Title: Re: Quick Question about moving to new hardware?
Post by: Seimus on December 27, 2024, 01:30:50 AM
Its very simple I did it like year ago.

You just have to edit out the physical NIC and replace them with the new physical NICs. Everything else can remain.

Basically in my case I replaced igb with igc and done.

Regards,
S.
Title: Re: Quick Question about moving to new hardware?
Post by: EricPerl on December 27, 2024, 07:36:10 PM
The editing in itself is fairly trivial. It's just that some machines don't make it easy.
I have one where the physical ports 1-4 ended up enumerating in the 1-4-2-3 order... You won't know until you try.