To request a previously committed (rollback) configuration, a client application emits the <get-rollback-information> and <rollback> tag elements in an <rpc> tag element. This operation is equivalent to the show system rollback operational mode command. The <rollback> tag element specifies the index number of the previous configuration to display; its value can be from 0 (zero, for the most recently committed configuration) through 49.
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):
<rpc>
<get-rollback-information>
<rollback>index-number</rollback>
</get-rollback-information>
</rpc>
The JUNOScript server encloses its response in <rpc-reply>, <rollback-information>, and <configuration> tag elements. The <load-success/> 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 Information from the Committed or Candidate Configuration.
<rpc-reply xmlns:junos="URL">
<rollback-information>
<load-success/>
<configuration attributes>
<!- - tag elements representing the complete previous configuration - ->
</configuration>
</rollback-information>
</rpc-reply>
To request formatted ASCII output, the application includes the <format> tag element with the value text:
<rpc>
<get-rollback-information>
<rollback>index-number</rollback>
<format>text</format>
</get-rollback-information>
</rpc>
The JUNOScript server encloses its response in <rpc-reply>, <rollback-information>, <configuration-information>, and <configuration-output> tag elements. For more information about how ASCII output is formatted, see Requesting Output as Formatted ASCII Text or JUNOS XML Tag Elements.
<rpc-reply xmlns:junos="URL">
<rollback-information>
<load-success/>
<configuration-information>
<configuration-output>
<!- - formatted ASCII text for the complete previous configuration - ->
</configuration-output>
</configuration-information>
</rollback-information>
</rpc-reply>
The following example shows how to request JUNOS XML-tagged output for the rollback configuration that has an index of 2. In actual output, the JUNOS-version variable is replaced by a value such as 9.4R1 for the initial version of JUNOS Release 9.4.
