OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: tdalej on June 30, 2018, 02:59:03 pm

Title: [Solved?] - Restore failures
Post 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:
Code: [Select]
      <descr>description of host</descr>

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:

Code: [Select]
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:

Code: [Select]
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!

I tried changing a single character in the backup file and I get the same errors.