Requesting the Rescue Configuration Using NETCONF
In a NETCONF session with a device running Junos OS, to request the rescue configuration, a client application emits the Junos XML <get-rescue-information> tag element in an <rpc> tag element. This operation is equivalent to the show system configuration rescue operational mode command.
The rescue configuration is a configuration saved in case it is necessary to restore a valid, nondefault configuration. (To create a rescue configuration, use the Junos XML <request-save-rescue-configuration> tag element or the request system configuration rescue save CLI operational mode command. For more information, see the Junos XML API Operational Reference or the Junos OS Operational Mode Commands.)
To request Junos XML-tagged output, the application either includes the <format> tag element with the value xml or omits the <format> tag element (Junos XML tag elements are the default):
The NETCONF server encloses its response in <rpc-reply>, <rescue-information>, and <configuration> tag elements. The <ok/> tag is a side effect of the implementation and does not affect the results. For information about the attributes in the opening <configuration> tag, see Requesting Committed or Candidate Configuration Information Using NETCONF.
<rpc-reply xmlns="URN" xmlns:junos="URL">
<rescue-information>
<ok/>
<configuration attributes
<!-- tag elements representing the rescue configuration -->
</configuration>
</rescue-information>
</rpc-reply>
]]>]]>
To request formatted ASCII output, the application includes the <format> tag element with the value text:
The NETCONF server encloses its response in <rpc-reply>, <rescue-information>, <configuration-information>, and <configuration-output> tag elements. For more information about the formatted ASCII notation used in Junos configuration statements, see the CLI User Guide.
<rpc-reply xmlns="URN" xmlns:junos="URL">
<rescue-information>
<ok/>
<configuration-information>
<configuration-output>
/* formatted ASCII for the rescue configuration*/
</configuration-output>
</configuration-information>
</rescue-information>
</rpc-reply>
]]>]]>