OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • [Solved?] - Restore failures
« previous next »
  • Print
Pages: [1]

Author Topic: [Solved?] - Restore failures  (Read 2458 times)

tdalej

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
[Solved?] - Restore failures
« 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]
  <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:

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!


Edit: 
I tried changing a single character in the backup file and I get the same errors.
« Last Edit: June 30, 2018, 05:51:25 pm by tdalej »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • [Solved?] - Restore failures
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2