OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: JRC on December 28, 2020, 03:07:33 am

Title: How to Migrate to new hardware?
Post by: JRC on December 28, 2020, 03:07:33 am
Hello everyone,

I am sure there is an easy answer to this, but I wanted to ask to make sure. I want to move my opnSense install from one machine to another (an intel based server, to a Dell R610) and I was wondering what the best way to migrate the setting over would be as the network cards would be different.

Currently I have a pair of NICs in a LAG for my LAN side of things and a single NIC for the internet side. I have several VLANs setup on the LAN side as well. The R610 has 4 NICs and I would like to have a similar setup there as well (though I may add the unused NIC to the LAGG and make it have 3 members, not sure yet).

So am I right in guessing that I need to:

1. Install opnSense on the R610
2. Back up the config from the Intel Server
3. Restore it to the R610
4. Do something with the network setup?

Or do I need to do the network interface setup, then restore the config?

Thanks in advance for the help!
Title: Re: How to Migrate to new hardware?
Post by: lar.hed on December 28, 2020, 09:41:29 am
Unless someone else has a solution, a simple one, I think this is howto:
1. take backup on old installation
2. take a backup of new installation (same version as old installation I guess, or you will find more differences)
3. copy the old installation backup to a specific editable file
4. compare backup files so that one can change the interface names in the newly copied editable file
5. load the edited verisin on new installation

However I hope there is a better way to do this.
Title: Re: How to Migrate to new hardware?
Post by: chemlud on December 28, 2020, 11:44:48 am
Unless someone else has a solution, a simple one, I think this is howto:
1. take backup on old installation
2. take a backup of new installation (same version as old installation I guess, or you will find more differences)
3. copy the old installation backup to a specific editable file
4. compare backup files so that one can change the interface names in the newly copied editable file
5. load the edited verisin on new installation

However I hope there is a better way to do this.

If the interfaces change, I guess: No.

Your could assign the interfaces after first boot correctly and then import the old config.xml (without interfaces) one-by-one, but I guess the editing will be faster (hopefully error-free ;-) )
Title: Re: How to Migrate to new hardware?
Post by: dcol on July 24, 2021, 11:56:14 pm
I would also make sure any added plugins be installed on the new hardware that exist on the old hardware.
Also custom files need to be copied to the new hardware. And, of course, adjust the interfaces as needed.
Then you can restore everything except interfaces, unless the hardware NIC ports are identical, from the configuration and it should be good.
Title: Re: How to Migrate to new hardware?
Post by: devhunter55 on October 23, 2021, 11:02:07 pm
just did the change from a APU2 Board to new TopTon Hardware today.

* Installed new OPNsense 21.7.3_3-amd64 on ZFS.
* backup config from APU2 Board
* change this backup xml config from
    <primaryconsole>serial</primaryconsole>
                               to
    <primaryconsole>video</primaryconsole>

    (because TopTon HW is has got a HD-/Video Port)
* Interface-names are the same.

So finally .. just power off the APU2, re-cabling, restore xml-backup-config from old HW to the new hardware,
reboot & and it works like a charm