Upgrade vs Clean Install

Started by Taomyn, January 30, 2023, 10:07:12 AM

Previous topic - Next topic
I'm debating doing a fresh install of OPNsense of v23.1 rather than upgrading from v22.7 but I'm wondering if it's worth it.


I don't recall what version my install started at but it's been pretty reliable, though one thing that's been on my mind is that it's still running on UFS with the new default being ZFS. Is it worth a clean upgrade just to get on ZFS or should a wait until I am forced e.g. new hardware or total loss?


The thing that holds me back is recreating all the "custom" stuff that isn't backed up normally e.g. I have scripts that execute speed tests against 5 servers, some custom commands for Unbound and who know how many other tweaks I have probably forgotten about. I'd be installing to a new drive so getting anything back shouldn't be too difficult, just a pain, also fully reverting will be simple.


Also, is it just a case of backing up the current installation, copying that to a USB drive then pointing the installer to that file?

Hi,

That's what I've done for the 23.X release. Fresh install and then resorted the config from a USB. Just make sure your config sits in a directory called conf, so like this /conf/config.xml

Once it is restored the system will reboot and all is good. Of course you will need to backup your custom scripts you have mentioned as well, I've had no issues doing it the way I have described Above.

Quote from: Taomyn on January 30, 2023, 10:07:12 AM
Is it worth a clean upgrade just to get on ZFS
Absolutely.

Being able to do snapshots and backup boot environments (bectl) prior to upgrades is a god-send.

Quote from: Taomyn on January 30, 2023, 10:07:12 AM
The thing that holds me back is recreating all the "custom" stuff that isn't backed up normally e.g. I have scripts that execute speed tests against 5 servers, some custom commands for Unbound and who know how many other tweaks I have probably forgotten about. I'd be installing to a new drive so getting anything back shouldn't be too difficult, just a pain, also fully reverting will be simple.
You could try to run a "diff" (compare directories etc.) between the two filesystems to find esp. custom scripts, config files etc.

Quote from: Taomyn on January 30, 2023, 10:07:12 AMAlso, is it just a case of backing up the current installation, copying that to a USB drive then pointing the installer to that file?
Basically yes. You may have issues initially e.g. having to reinstall plugins  / repos but those can usually be sorted out pretty easily.

Quote from: Taomyn on January 30, 2023, 10:07:12 AM
Also, is it just a case of backing up the current installation, copying that to a USB drive then pointing the installer to that file?

The following article helped me, but since I'm new to OPNsense and was simply just changing out hardware (with different interface names), I didn't have too much else to think about other than changing the interface names and then reinstalling plugins afterwards. It's nice that OPNsense will flag the plugins that are missing.

Two tips:
1. Config backup should be unencrypted
2. I found that I not only needed to re-enable root but also temporarily disable MFA. Be sure to do this before backing up the config.

Quote from: abulafia on January 30, 2023, 01:16:09 PM

Being able to do snapshots and backup boot environments (bectl) prior to upgrades is a god-send.

If i understand correctly you can completely rollback? I really miss this feature in OPNsense (compared with TrueNAS). Someone created a guide?


Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: pmhausen on February 02, 2023, 07:02:45 PM
I did:

https://forum.opnsense.org/index.php?topic=25540.msg122731#msg122731

This is so cool, thanks for linking to your previous guide. Really appreciate it since I'm new to OPNsense. Reminds me of dual root partitions in Junos...
I'm excited to try this for the next major upgrade.

Thank you all for the responses, very much appreciated, busy week so wasn't able to check this thread until now.


Hopefully I can give a clean upgrade a go soon during a time I can afford to be without Internet for a few hours - may be a good opportunity to test out my standby RPi-4 running OpenWRT, it's been a while.

Just to follow up, I was finally able to put in the time to upgrade to v23 using a clean install to import the old config - I was able to try it live off the USB installer which worked without a hitch, then did a ZFS install to a new SSD, rebooted and all was pretty much ok.


The extras I needed to do were:

       
  • Re-install the missing plug-ins, although one need an external repo to be added first. Nevertheless they all started up just like before
  • Copy back my custom cron job files - this could have been made easier if the GUI highlighted them similarly to the plugins instead of just replacing the command with the first on the list. I couldn't remember what they were called before and where they were located. Still, I quick search of the old disk and they worked fine after I copied them over.
  • Some odd script/executable files I used with one of the cron jobs
  • Gave the Zabbix account a home folder, so it can execute said scripts
And that was it - so far it's all been working fine for a few days, HAProxy, WireGuard, firewall rules, all like before.


Great job OPNsense team  8)