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

# 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.

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

- In configuration mode, specify the load override command. For example:
  `
  [edit]
  user@host# load override complete-newcfg.xml format xml
  `

  When you use the load override command and commit the configuration, all system processes reparse the configuration.

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 Topics

- Replacing the Current Configuration with the Default SRC Configuration
- Merging the Active Configuration with Another Configuration
- Replacing Parts of the Configuration
- Adding a Configuration Through Configuration Mode Commands
- Reverting to a Previous SRC Configuration

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