OPNsense Forum
Archive => 18.1 Legacy Series => Topic started by: tdalej on June 30, 2018, 02:59:03 pm
-
Geany line wrap bit me, I think. :P
I'm trying to restore a list of unbound DNS entries.
It's a lengthy list and although the OPNSense GUI is handy, it would be FAR easier to make mass changes in the XML backup file and restore.
I wrote three entries, saved and downloaded the configuration.
Unbound section looks like this:
<unbound>
<enable>1</enable>
<custom_options/>
<dnssec>1</dnssec>
<regdhcp>1</regdhcp>
<regdhcpstatic>1</regdhcpstatic>
<txtsupport>1</txtsupport>
<active_interface>lan</active_interface>
<outgoing_interface>wan</outgoing_interface>
<hosts>
<host>hostname</host>
<domain>domainname</domain>
<rr>A</rr>
<ip>192.168.1.25</ip>
<mxprio/>
<mx/>
<descr>description of host</descr>
</hosts>
</unbound>
Duplicating the <host> to </host> content with appropriate edits, then attempting to restore results in this message in the restore interface with no further detail I can find anywhere:
The following input errors were detected:
The configuration could not be restored.
If I try to restore only the Unbound information I get this message on a new page:
Fatal error: Uncaught OPNsense\Core\ConfigException: invalid config xml in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:336 Stack trace: #0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(168): OPNsense\Core\Config->loadFromFile('/tmp/tmpxml') #1 /usr/local/etc/inc/config.inc(71): OPNsense\Core\Config->toArrayFromFile('/tmp/tmpxml', Array) #2 /usr/local/www/diag_backup.php(134): load_config_from_file('/tmp/tmpxml') #3 /usr/local/www/diag_backup.php(298): restore_config_section('unbound', '
Any pointers would be greatly appreciated!
Edit:
I tried changing a single character in the backup file and I get the same errors.