How to upgrade packages without losing configuration?



  • I apologize if this bit of information is easy to find, but I have not been able to find it anywhere.    I'm a new user, and I recently saw that the snort package had updated.  I did not see anything in the UI for "upgrade" only "reinstall".  Upon hitting reinstall, after the process had completed I had lost all of the configuration for the package.  I had to re-enter oink codes, re-enable interfaces, reset all of my rules and suppression lists.

    Certainly there is some way to upgrade packages without losing all of the configuration every time??



  • Most packages I've tried don't have that behaviour.  Perhaps Snort is an exception, but otherwise I routinely upgrade packages when new builds are available and it's a painless process.



  • @KOM:

    Most packages I've tried don't have that behaviour.  Perhaps Snort is an exception, but otherwise I routinely upgrade packages when new builds are available and it's a painless process.

    Well that's odd.  It wasn't even a major update, just a minor package version difference.  There is now another one out there but I'm afraid to click the button.

    Would backing up configuration immediately prior to upgrading and then restoring the config.xml afterwards be a good enough way to mitigate the behavior?



  • I'm not sure, but I would hold off on the upgrade until you get some clarity on the process and its expected behaviour.  I don't use Snort, but maybe someone else with more experience can chime in.


  • Moderator

    Hello binaryjay,

    In the Snort:Global settings Tab (at the bottom) this option needs to be enabled. During updates, the package is deinstalled and reinstalled.

    **Keep Snort Settings After Deinstall:

    Settings will not be removed during package deinstallation.**



  • @BBcan177:

    Hello binaryjay,

    In the Snort:Global settings Tab (at the bottom) this option needs to be enabled. During updates, the package is deinstalled and reinstalled.

    **Keep Snort Settings After Deinstall:

    Settings will not be removed during package deinstallation.**

    Thank you.  I have to admit that I did notice that option when I first set it up, but for some reason it never clicked in my head that upgrading the package would be considered "deinstallation".  I went ahead and upgraded again and everything was retained this time.  Seems to me that this option ought to be:

    A) Default to ON.  Upgrades are probably more frequent than complete removal.
    B) User decision integrated at time of upgrade/deinstall rather than hidden in configuration.  I'm not familiar with pfSense packages and whether or not there can be any user interaction after the process has been started or not though.

    Anyway, lesson learned.


  • Moderator

    Hi Jay,

    I agree that it would be better to default it to on, or have a popup at Upgrades.

    Bill Meeks is the Package maintainer. I am sure that he will see this thread. Next time, Post in the Packages forum as its a Snort Package related issue.

    Glad that you got it to work. Re-creating Snort Config is not easy…


  • Moderator

    Looks like the deinstall option will be defaulted to "on" with the next release but only for new installs.

    https://github.com/pfsense/pfsense-packages/pull/678


Log in to reply