Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Commit a Private Copy of the Configuration Using the Junos XML Protocol

In a Junos XML protocol session with a device running Junos OS, to commit a private copy of the configuration so that it becomes the active configuration on the routing, switching, or security platform, a client application encloses the empty <commit-configuration/> tag in an <rpc> tag element (just as for the candidate configuration).

The Junos XML protocol server creates a copy of the current candidate configuration, merges in the changes made to the private copy of the configuration, and then commits the combined candidate to make it the active configuration on the device. The server reports the results of the commit operation in <rpc-reply> and <commit-results> tag elements.

If the private copy does not include any changes, the server emits the opening <commit-results> tag and closing </commit-results> tags with nothing between.

If the private copy includes changes and the commit operation succeeds, the server emits the <load-success/> tag when it merges the changes in the private copy into the candidate configuration. The <routing-engine> element encloses the <commit-success/> tag and the <name> element, which reports the name of the Routing Engine on which the commit operation succeeded (re0 on devices that use a single Routing Engine, and either re0 or re1 on devices that can have two Routing Engines).

If the private copy includes changes that conflict with the regular candidate configuration, the commit fails. The <load-error-count> tag element reports the number of errors and an <xnm:error> tag element encloses tag elements that describe the error.

There are restrictions on committing a private copy. For example, the commit fails if the regular candidate configuration is locked by another user or application, or if it includes uncommitted changes made since the private copy was created. For more information, see the CLI User Guide.

Most of the variants of the commit operation are available for a private copy.


The confirmed-commit operation is not available for a private copy. For information about using that operation for the regular candidate configuration, see Committing the Candidate Configuration Only After Confirmation Using the Junos XML Protocol.