<load-configuration>
Usage
<rpc><load-configuration rollback="index"/>
<load-configuration url="url"[action="(merge|override|replace)"] \[format="(text|xml)"]/><load-configurationformat="text"[action="(merge|override|replace)"]><configuration-text><!--formatted ASCII configuration statements to load--></configuration-text></load-configuration><load-configuration[action="(merge|override|replace)"] [format="xml"]><configuration><!--tag elements representing configuration statements to load--></configuration></load-configuration></rpc>Description
Request that the JUNOScript server load configuration data into the current candidate configuration. Provide the data to load in one of three ways:
- Set the empty
<load-configuration/>tag'srollbackattribute to the numerical index of a previous configuration. The routing platform stores a copy of the most recently committed configuration and several previous configurations (up to 9 in JUNOS Release 5.7 and earlier, or up to 49 in JUNOS Release 6.0 and later). The specified previous configuration completely replaces the current configuration.- Set the empty
<load-configuration/>tag'surlattribute to the pathname of a file that resides on the routing platform and contains the configuration data to load. The data can be either formatted ASCII (in which case theformatattribute must be set to the valuetext) or JUNOScript tag elements (in which case theformatattribute is either omitted or set to the valuexml).In the following example, the
urlattribute identifies/tmp/add.confas the file to load. (The omission of theformatattribute indicates that the file contains JUNOScript tag elements.)<load-configuration url="/tmp/add.conf"/>
- Enclose the configuration data within an opening
<load-configuration>and closing</load-configuration>tag. If providing the configuration data as formatted ASCII, enclose it in a<configuration-text>tag element and set theformatattribute to the valuetext. If providing configuration data as JUNOScript tag elements, enclose it in a<configuration>tag element and optionally set theformatattribute to the valuexml.Attributes
action—Specifies how to load the configuration data, particularly when the current candidate contains conflicting statements. There are three acceptable values:
merge—Combines the data in the loaded configuration with the current candidate configuration. If statements in the loaded configuration conflict with statements in the current candidate configuration, the loaded statements replace the current ones. This is the default behavior if theactionattribute is omitted.override—Discards the entire current candidate configuration and replaces it with the loaded configuration.replace—Substitutes each hierarchy level or configuration object defined in the loaded configuration for the corresponding level or object in the current configuration.If providing the configuration data as formatted ASCII (either in the file named by the
urlattribute or enclosed in a<configuration-text>tag element), also place thereplace:statement on the line directly preceding the statements that represent the hierarchy level or object to replace. For more information, see the section about loading a configuration in the JUNOS Internet Software Configuration Guide: Getting Started.If providing the configuration data as JUNOScript tag elements, also set the
replaceattribute to the valuereplaceon the opening tag of the container tag element that represents the hierarchy level or object to replace.
format—Specifies the format used for the configuration data. There are two acceptable values:
text—Indicates that configuration statements are formatted as ASCII text, using the newline character, tabs and other white space, braces, and square brackets to indicate the hierarchical relationships between the statements. This is the format used in configuration files stored on the routing platform and displayed by the CLIshow configurationcommand.xml—Indicates that configuration statements are represented by the corresponding JUNOScript tag elements. This is the default value if theformatattribute is omitted.
rollback—Specifies the numerical index of the previous configuration to load. Valid values for the index are0(zero, for the most recently committed configuration) through the index for the oldest possible stored configuration:9for JUNOS Release 5.7 and earlier, and49for JUNOS Release 6.0 and later.
url—Specifies the full pathname of the file that contains the configuration data to load. The file must reside on the routing platform's local disk.See Also
<configuration>,<configuration-text>,<load-configuration-results>,<rpc>