Restore backup packages from the console
-
Hello friends, I am creating a script to install the Zabbix Agent and Zabbix Proxy on pfSense, so that I can facilitate the process of deploying the packages, user parameters and scripts necessary for the correct monitoring of the environments I manage.
I tried to find a simple way to change the xml to insert the data, running the least risk of corrupting the pfSense configuration file and so far the best option I found was to generate a backup only of the packages from a pfSense configured only I need and then import this file into the new pfSense.
Searching the internet I didn't find anything like that, so I went straight to the pfSense source code and found the command rrdtool restore -f '{$ xml_file}' '{$ rrd_file}', but I couldn't understand how it would work.
Tried: rrdtool restore -f packages.xml /conf/config.xml
However returned error: ERROR: line 14: expected <installedpackages> element but found <rrd>
If anyone knows how to solve this then I would appreciate it very much.