Scripts to upgrade pfSense and backup configurations
-
Hi ,
I understand that there is a Shell mode in pfSense where we can access to the command line.
Can anyone advise if it is possible to run scripts in Shell mode to
a. update the pfSense version, if there is any
b. backup the configurations in pfSenseThanks
Regards
Kwang Mien -
The console access isn't optional or hidden.
When the system is just installed, and network interfaces are not assigned yet, it's the only way to access the system.SSH can be activated if needed.
The console or SSH access permits you to access to file /cf/conf/config.xml, that's the file that contains all the settings.
-
@Gertjan Thanks for the info. I read in the document, to upgrade from console to run this command
pfSense-upgrade
does this upgrade all the packages used in pfSense ?
-
Maybe ? Probably ?
I use option 13 from this menu :For update or upgrade debugging, the command line can be useful, see the forum, Problems Installing or Upgrading pfSense Software
-
If you upgrade from the CLI using
pfSense-upgrade
it will update all packages during the upgrade. But only if a new pfSense version is available. -
@stephenw10 Thanks for the info.
a. after executing pfSense-upgrade and assuming there is a new version, will the firewall be rebooted ?
b. Is it possible to run pfSense-upgrade as a cron job ? -
Yes an upgrade requires a reboot.
Yes, you could run it as a cronjob but I would never recommend doing that. You should always review the release notes etc before upgrading. IMO it should always be a manual task.