The pfSense Store

Author Topic: Restore file question  (Read 194 times)

0 Members and 1 Guest are viewing this topic.

Offline gsmornot

  • Jr. Member
  • **
  • Posts: 33
  • Karma: +1/-0
    • View Profile
Restore file question
« on: December 14, 2017, 09:53:45 am »
This may be an obvious question but can I use a config file from 2.4.3 Development to restore a 2.4.2 Final install? I know you cannot go backwards but does that apply to point releases too? No issues just have another firewall as a backup that is currently on 2.4.2 and want to avoid updating it to 2.4.3 just to use the config file.

Online Hugovsky

  • Full Member
  • ***
  • Posts: 273
  • Karma: +8/-0
    • View Profile
Re: Restore file question
« Reply #1 on: December 15, 2017, 06:02:06 am »
Yes, you can.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21493
  • Karma: +1458/-26
    • View Profile
Re: Restore file question
« Reply #2 on: December 15, 2017, 07:34:59 am »
Usually, no, because the configuration format changes. That said, at the moment, they are still on the same configuration format version (17.3, see https://doc.pfsense.org/index.php/Versions_of_pfSense_and_FreeBSD ) so you can move the configuration either way.

If anything gets changed on 2.4.3 snapshots that increases that number, then the configuration can no longer be moved back to 2.4.2.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline gsmornot

  • Jr. Member
  • **
  • Posts: 33
  • Karma: +1/-0
    • View Profile
Re: Restore file question
« Reply #3 on: December 15, 2017, 04:02:40 pm »
Worked no problem. Thanks.

Offline jahonix

  • Hero Member
  • *****
  • Posts: 2502
  • Karma: +150/-16
  • volunteer since 2006
    • View Profile
Re: Restore file question
« Reply #4 on: December 15, 2017, 04:47:38 pm »
Sorry, I don't get it completely.
When you say that "the configuration format changes" then I think there are two things you mean (and one you don't).

a) the version number is increased
<?xml version="1.0"?>
<pfsense>
   <version>17.3</version>

b) tags are added. (have tags ever been deleted?)

Generally it does not mean that you don't use XML anymore or do something else that I'd call a "format change". It's still xml version 1.0, right?

An older version pfSense would have "problems" reading tags that it doesn't know yet.
Would it stop importing all infos of a newer config.xml or just skip the unknown parts? (I don't have an install handy to test it with).

Isn't calling it a "change in configuration format" a bit too much?
But then, I'm not native english and I might be missing something.


PS: Really no pun intended, just trying to understand!
Chris

The issue with IPv6 jokes is that almost no one understands them and no one is using them yet.

Offline PiBa

  • Hero Member
  • *****
  • Posts: 819
  • Karma: +132/-1
  • PiBa-NL(on IRC)
    • View Profile
Re: Restore file question
« Reply #5 on: December 15, 2017, 06:04:07 pm »
Yes its still XML, and yes 'probably' a config from 2.4.3 can be 'somewhat' imported even on 2.2.x.

HOWEVER, it wasn't tested or even intended to work, and you will certainly loose some configuration settings (assuming you use those parts that were changed.) and end up with a 'dirty' configuration some tags could be there that shouldn't be, other might be missing that are normally always there..

When going to a newer config version 'upgrade steps' https://github.com/pfsense/pfsense/blob/master/src/etc/inc/upgrade_config.inc can involve modifying existing settings into a newer 'format' restoring the new config format on a old pfSense version will likely mean those converted settings are not understood by the software and effectively 'skipped' or cause other unexpected problems..

I'm not saying its impossible, and well sometimes like in this case the config didn't change and it can be done without a possibility for trouble.. But be very careful and double-check everything is still in working order when restoring a config on a old version.

Usually a increase in version number also means some config upgrade steps where added.. so your a) and b) are done together, and yes tags get deleted/replaced or little changes to their meaning..

My 2 cents :).