Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Retrieve the Rescue Configuration Using the Junos XML Protocol

A Junos XML protocol client application can use the <get-rescue-information> request tag to retrieve the existing rescue configuration on a Junos device.

A rescue configuration allows you to define a known working configuration or a configuration with a known state that you can restore at any time. You use the rescue configuration to revert to a known configuration or as a last resort if the device configuration and the backup configuration files become damaged beyond repair.

You must create a rescue configuration on the device before you can retrieve or use it. When you create a rescue configuration, the device saves the most recently committed configuration as the rescue configuration. You can create a rescue configuration using the following methods:

  • In a Junos XML protocol session, use the <request-save-rescue-configuration> request tag.

  • In the Junos OS CLI, issue the request system configuration rescue save operational mode command.

A Junos XML protocol client application can retrieve the rescue configuration from devices running Junos OS or devices running Junos OS Evolved. A client application requests the rescue configuration by emitting an <rpc> element and enclosing the Junos XML <get-rescue-information> request tag. The operation is equivalent to the show system configuration rescue operational mode command.

By default the server returns the rescue configuration in Junos XML format. To explicitly request XML output, the application can also include the <format>xml</format> element.

The Junos XML protocol server encloses its response in <rpc-reply>, <rescue-information>, and <configuration> tag elements. The <load-success/> tag is a side effect of the implementation and does not affect the results.

To request the rescue configuration in formatted ASCII output, the application includes the <format> element with the value text.

The Junos XML protocol server encloses its response in <rpc-reply>, <rescue-information>, <configuration-information>, and <configuration-output> tag elements.

To request the rescue configuration in JSON format, the application includes the <format> element with the value json.

The Junos XML protocol server encloses its response in <rpc-reply>, <rescue-information>, <configuration-information>, and <json-output> elements.