- play_arrow Overview
- play_arrow Junos XML Management Protocol and Junos XML API Overview
- play_arrow Junos XML Protocol and Junos XML Tags Overview
- XML and Junos OS Overview
- XML Overview
- XML and Junos XML Management Protocol Conventions Overview
- Map Junos OS Commands and Command Output to Junos XML Tag Elements
- Map Configuration Statements to Junos XML Tag Elements
- Using Configuration Response Tag Elements in Junos XML Protocol Requests and Configuration Changes
- play_arrow Junos XML Protocol and JSON Overview
-
- play_arrow Manage Configurations Using the Junos XML Protocol
- play_arrow Change the Configuration Using the Junos XML Protocol
- Request Configuration Changes Using the Junos XML Protocol
- Upload and Format Configuration Data in a Junos XML Protocol Session
- Upload Configuration Data as a File Using the Junos XML Protocol
- Upload Configuration Data as a Data Stream Using the Junos XML Protocol
- Define the Format of Configuration Data to Upload in a Junos XML Protocol Session
- Specify the Scope of Configuration Data to Upload in a Junos XML Protocol Session
- Replace the Configuration Using the Junos XML Protocol
- Create, Modify, or Delete Configuration Elements Using the Junos XML Protocol
- Create New Elements in Configuration Data Using the Junos XML Protocol
- Merge Elements in Configuration Data Using the Junos XML Protocol
- Replace Elements in Configuration Data Using the Junos XML Protocol
- Replace Only Updated Elements in Configuration Data Using the Junos XML Protocol
- Delete Elements in Configuration Data Using the Junos XML Protocol
- Rename Objects In Configuration Data Using the Junos XML Protocol
- Reorder Elements In Configuration Data Using the Junos XML Protocol
- Protect or Unprotect a Configuration Object Using the Junos XML Protocol
- Change a Configuration Element’s Activation State Using the Junos XML Protocol
- Change a Configuration Element’s Activation State Simultaneously with Other Changes Using the Junos XML Protocol
- Replace Patterns in Configuration Data Using the NETCONF or Junos XML Protocol
- play_arrow Commit the Configuration on a Device Using the Junos XML Protocol
- Verify Configuration Syntax Using the Junos XML Protocol
- Commit the Candidate Configuration Using the Junos XML Protocol
- Commit a Private Copy of the Configuration Using the Junos XML Protocol
- Commit a Configuration at a Specified Time Using the Junos XML Protocol
- Commit the Candidate Configuration Only After Confirmation Using the Junos XML Protocol
- Commit and Synchronize a Configuration on Redundant Control Planes Using the Junos XML Protocol
- Log a Message About a Commit Operation Using the Junos XML Protocol
- View the Configuration Revision Identifier for Determining Synchronization Status of Devices with NMS
- play_arrow Ephemeral Configuration Database
- Understanding the Ephemeral Configuration Database
- Unsupported Configuration Statements in the Ephemeral Configuration Database
- Enable and Configure Instances of the Ephemeral Configuration Database
- Commit and Synchronize Ephemeral Configuration Data Using the NETCONF or Junos XML Protocol
- Managing Ephemeral Configuration Database Space
-
- play_arrow Request Operational and Configuration Information Using the Junos XML Protocol
- play_arrow Request Operational Information Using the Junos XML Protocol
- play_arrow Request Configuration Information Using the Junos XML Protocol
- Request Configuration Data Using the Junos XML Protocol
- Specify the Source for Configuration Information Requests in a Junos XML Protocol Session
- Specify the Output Format for Configuration Data in a Junos XML Protocol Session
- Request Commit-Script-Style XML Configuration Data Using the Junos XML Protocol
- Specify the Output Format for Configuration Groups and Interface Ranges Using the Junos XML Protocol
- Request Identifier Indicators for Configuration Elements Using the Junos XML Protocol
- Request Change Indicators for Configuration Elements Using the Junos XML Protocol
- Specify the Scope of Configuration Data to Return in a Junos XML Protocol Session
- Request the Complete Configuration Using the Junos XML Protocol
- Request a Configuration Hierarchy Level or Container Object Without an Identifier Using the Junos XML Protocol
- Request All Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Specific Number of Configuration Objects Using the Junos XML Protocol
- Request Identifiers for Configuration Objects of a Specific Type Using the Junos XML Protocol
- Request a Single Configuration Object Using the Junos XML Protocol
- Request Subsets of Configuration Objects Using Regular Expressions
- Request Multiple Configuration Elements Using the Junos XML Protocol
- Retrieve a Previous (Rollback) Configuration Using the Junos XML Protocol
- Retrieve the Rescue Configuration Using the Junos XML Protocol
- Compare the Active or Candidate Configuration to a Prior Version Using the Junos XML Protocol
- Compare Two Previous (Rollback) Configurations Using the Junos XML Protocol
- Request an XML Schema for the Configuration Hierarchy Using the Junos XML Protocol
-
- play_arrow Junos XML Protocol Utilities
- play_arrow Develop Junos XML Protocol C Client Applications
-
- play_arrow Configuration Statements and Operational Commands
ON THIS PAGE
<load-configuration>
Usage
<rpc> <load-configuration configuration-revision="revision-id"/> <load-configuration rescue="rescue"/> <load-configuration rollback="index"/> <load-configuration url="url" [action="(merge | override | replace | update)"] [format="(text | xml)"] /> <load-configuration url="url" [action="(merge | override | update)"] format="json" /> <load-configuration url="url" action="set" format="text"/> <load-configuration [action="(merge | override | replace | update)"] [format="xml"]> <configuration> <!-- tag elements for configuration elements to load --> </configuration> </load-configuration> <load-configuration [action="(merge | override | replace | update)"] format="text"> <configuration-text> <!-- formatted ASCII configuration statements to load --> </configuration-text> </load-configuration> <load-configuration [action="(merge | override | update)"] format="json"> <configuration-json> <!-- JSON configuration data to load --> </configuration-json> </load-configuration> <load-configuration action="set" format="text"> <configuration-set> <!-- configuration mode commands to load --> </configuration-set> </load-configuration> </rpc>
Description
Request that the NETCONF or Junos XML protocol server load configuration data into the candidate configuration or open configuration database.
If a client application issues the Junos XML protocol <open-configuration>
operation to open a specific
configuration database before executing the <load-configuration>
operation, the server loads the configuration data into the open
configuration database. Otherwise, the server loads the configuration
data into the candidate configuration.
Provide the data to load in one of the following ways:
Set the empty
<load-configuration/>
tag’sconfiguration-revision
attribute to the configuration revision identifier of a previously committed configuration. The specified configuration completely replaces the candidate configuration.Set the empty
<load-configuration/>
tag’srescue
attribute to the valuerescue
. The rescue configuration completely replaces the candidate configuration.Set the empty
<load-configuration/>
tag’srollback
attribute to the rollback index of a previously committed configuration. The device stores a copy of the most recently committed configuration and up to 49 previous configurations. The specified configuration completely replaces the candidate configuration.Set the empty
<load-configuration/>
tag’surl
attribute to the pathname of a file that contains the configuration data to load. Set theformat
attribute tojson
,text
, orxml
to load a configuration in the respective format-JavaScript Object Notation (JSON), formatted ASCII text, or Junos XML tag elements (the default). To provide the configuration data as configuration mode commands, include theaction="set"
attribute, and either omit theformat
attribute or set the value totext
.In the following example, the
url
attribute identifies that the configuration data should be loaded from the /tmp/add.conf file.content_copy zoom_out_map<load-configuration url="/tmp/add.conf" format="text"/>
Enclose the configuration data as a data stream within an opening
<load-configuration>
and closing</load-configuration>
tag. If providing the configuration data as formatted ASCII text, enclose the data in a<configuration-text>
tag element, and set theformat
attribute totext
. If providing the configuration data as Junos XML tag elements, enclose the data in a<configuration>
tag element, and either omit theformat
attribute or set the value toxml
. If providing the configuration data as configuration mode commands, enclose the data in a<configuration-set>
tag element, set theaction
attribute toset
, and either omit theformat
attribute or set the value totext
. If providing the configuration data in JSON, enclose the data in a<configuration-json>
tag element, and set theformat
attribute tojson
.
Attributes
action | Specify how to load the configuration data, particularly when the target configuration database and the loaded configuration contain conflicting statements. The ephemeral configuration database supports the following
The following are acceptable values:
|
configuration-revision | Load a previously committed configuration by referencing its configuration revision identifier. The specified configuration completely replaces the candidate configuration. |
format | Specify the format used for the configuration data. Acceptable values are:
|
rescue | Specify that the rescue configuration replace the current candidate configuration. The only valid value is "rescue". Note: Starting in Junos OS Release 18.1R1 you can also use the |
rollback | Load a previously committed configuration by referencing its numerical rollback index. Valid values are 0 (zero, for the most recently committed configuration) through one less than the number of stored previous configurations (maximum is 49). Note: Starting in Junos OS Release 18.1R1 you can also use the |
url | Specify the full pathname of the file that contains the configuration data to load. The value can be a local file path, an FTP location, or a Hypertext Transfer Protocol (HTTP) URL:
In each case, the default value for the path variable is the home directory for the username. To specify an absolute path, the application starts the path with the characters %2F; for example, ftp://username:password@hostname/%2Fpath/filename. |
Release Information
This is a Junos XML management protocol operation. It is supported in Junos XML protocol sessions, and it is supported as a Juniper Networks proprietary extension in NETCONF sessions on devices running Junos OS that identify the URI http://xml.juniper.net/netconf/junos/1.0 in the capabilities exchange.
action
attribute value set
added in Junos OS Release 11.4.
format
attribute value json
added in Junos OS Release 16.1.
configuration-revision
attribute
added in Junos OS Release 20.4R1 and Junos OS Evolved Release 20.4R1.