Be careful trying to restore backup of 2.4.5p1
-
So I wasted most of yesterday trying to deal with a bug in restoring a config. 2.4.5p1 has a rarely occurring mbuf bug that in my configuration causes a crash every 3 weeks or so. I posted about it, but it's not anything obvious, and given all the network drivers change in freebsd 12, it made sense to put up with it and wait until 2.5 was stable and upgrade and see if it still occurred.
Well, in addition to the issues in 2.5, 2.5 doesn't seem to work well with the mods to enable AT&T gateway bypass in fiber installations (https://github.com/MonkWho/pfatt). So I am waiting for that to be resolved before upgrading.
Friday night pfsense panic'd again, but this time corrupted the image so it wouldn't just reboot. Well, that's a problem, but I run virtualized, and have a config backup from a couple months ago. So I restored a snapshot from back in july of last year, brought the system back up, and then restored the recent config.xml from the dead configuration that I extracted by mounting that image on a different freebsd machine on the same host.
Things went OK for a bit, but then I couldn't log in to the system, and then when I tried rebooting, it spewed out a bunch or errors and failed.
It appears that what happened was the config.xml backup I was using had a the upgrade release train set automatically. When it started reinstalling the plugins, it didn't use the 2.4.5p1 packages for the running system that was backed up, but the 2.5.0 ones. This hosed the libraries and eventually completely hosed the system.
I went back to the old version snapshot from last summer, but it didn't have a bunch of changes I had put in, and was causing other problems but at least I had connectivity.
I wasted a bunch of time on this until noticing that the restore function has an option for restoring just part of the config! So I restored everything one by one and just didn't restore the package configuration. That led to a mostly complete restoral of functionality, but there were a bunch of entries that had been added to my freeradius configuration that I needed. So I snapshotted the functional system, did a full restore of the problematic conbfig.xml, but before the system went nuts during the plugin rebuild, I copied the data from freeradius via cut and paste to notepad, and then restored the snapshot. After I manually typed in the deltas, everything was fine again.
So if you are running 2.4.5p1, MAKE SURE you are on the 2.4.5 release train (DEPRECATED) in the update configuration before you do the backup of the config. By default I think pfsense sets the upgrade to the current 2.5.0 train, and you will have a lot of issues if you try and restore with that backup.
Moreover, this seems to be a bug - during restore, it should use the repos for the running version, not the branch being used for updates. Restore should ALWAYS work to get you to back where you were, and then do updates after that configuration is restored.
Is there a bug posted on this behavior already?
Thanks
mike -
-
Thanks. This is a major bug! There should be a sticky somewhere to warn people about this.
-
-