Replacing the Configuration

You can replace a configuration from files in XML or text format. The examples in this section use files in XML format.

Note: You cannot use the file saved by using the save filename format set command to replace the CLI configurations.

To replace all of the active configuration with a full configuration in a specified file:

The following example shows part of an existing configuration, the configuration in the file to be loaded, and the resulting configuration. In the resulting configuration, bold text indicates the configuration that changed.

Existing configuration:

<configuration>. . .<system>. . .<host-name>myhost</host-name><name-server>192.2.2.10</name-server><name-server>192.2.2.20</name-server><domain-search>mydomain.juniper.net</domain-search><domain-search>juniper.net</domain -search>. . .</system>. . .</configuration>

Configuration in the file to be loaded:

<configuration>. . .<system>. . .<host-name>myhost</host-name><name-server>192.2.2.30</name-server><name-server>192.2.2.40</name-server><domain-search>newdomain.juniper.net</domain-search>. . .</system>. . .</configuration>

Resulting configuration:

<configuration>. . .<system>. . .<host-name>myhost</host-name><name-server>192.2.2.30</name-server><name-server>192.2.2.40</name-server><domain-search>newdomain.juniper.net</domain-search>. . .</system>. . .</configuration>

Related Documentation