[Contents] [Prev] [Next] [Index] [Report an Error]

Replacing the Configuration with New Data

To discard the entire candidate configuration or private copy and replace it with new configuration data, a client application includes the action="override" attribute in the <load-configuration/> tag or opening <load-configuration> tag:

<rpc>
<!- - For a file - ->
<load-configuration action="override" url="file" [format="text"]/>

<!- - For a data stream - ->
<load-configuration action="override" [format="text"]>
<!- - configuration data - ->
</load-configuration>
</rpc>

For more information about the url and format attributes and the syntax for the new configuration data, see Specifying the Source and Format of New Configuration Data.

The following example shows how to specify that the contents of the file /tmp/new.conf replace the entire candidate configuration. The file contains JUNOS XML tag elements (the default), so the format attribute is omitted.

Image t1133.gif
[Contents] [Prev] [Next] [Index] [Report an Error]