load configuration merge

Function

The load configuration merge command loads the local configuration file or the configuration file on a remote server and delivers configurations to the local device.

Format

load configuration server ip-address [ vpn-instance vpn-instance-name ] transport-type { ftp | sftp } username user-name password password-value file file-name merge [ relative ]

load configuration server ipv6 ipv6-address [ vpn-instance vpn-instance-name ] transport-type { ftp | sftp } username user-name password password-value file file-name merge [ relative ]

load configuration file file-name merge [ relative ]

load configuration server http url url-address [ vpn-instance vpn-instance-name ] merge [ relative ]

Parameters

Parameter Description Value
vpn-instance vpn-instance-name

Specifies a VPN instance name.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

transport-type

Specifies a file transfer protocol.

-

ftp

Indicates that FTP is used for file transfer.

-

sftp

Indicates that SFTP is used for file transfer.

-

username user-name

Specifies the user name of a remote server.

The value is a string of 1 to 64 case-sensitive characters, spaces and question marks not supported.

password password-value

Specifies the password of a remote server.

The value is a string of case-sensitive characters, including letters and digits. The string can contain spaces if it is enclosed in double quotation marks ("). A simple password is a string of 1 to 255 characters, while a ciphertext password is a string of 20 to 432 characters.

file file-name

Specifies the name of a file.

The value (including the file name extension) is a string of 1 to 128 case-sensitive characters, including uppercase letters, lowercase letters, digits, and special characters but excluding spaces.

Special characters do not include ~ ? * / \ : " | < > [ ] In addition, the value must not start or end with a dot (".").

The file name extension must be .cfg, .zip, .dat, .bat, .txt, or name of text file without suffix. FTP or SFTP also supports the file names with a server directory. The file name does not support the following special characters: ~ ? * : " | < > [ ]

relative

Specifies that only configurations in the current view are delivered.

-

server ip-address

Specifies the IP address of a remote server.

The value is in dotted decimal notation and cannot be any multicast or broadcast address.

ipv6 ipv6-address

Specifies the IPv6 address of a remote server.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

http

Specifies access to the remote server by HTTP. HTTP and HTTPS can be used.

-

url url-address

Specifies the URL address of a remote server.

The value is a string of 1 to 255 characters.

Views

All views except the user view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
config debug

Usage Guidelines

Usage Scenario

To load the configuration file on a remote server or local configuration file to the running configuration database, perform one of the following operations based on the location of the configuration file:

  • Run the load configuration server transport-type { ftp | sftp } username password file merge [ relative ] command to load the configuration file on an IPv4 server and deliver configurations to the local device.
  • Run the load configuration server ipv6 transport-type { ftp | sftp } username password file merge [ relative ] command to load the configuration file on an IPv6 server and deliver configurations to the local device.
  • Run the load configuration file merge [ relative ] command to load the local configuration file and deliver configurations.
  • Run the load configuration server http url merge [ relative ] command to load the configuration file on the server at a specified URL and deliver configurations to the local device.

The load configuration merge command can deliver all configurations of only configurations in a specific view. If relative is specified, only configurations in the current view are delivered.

Prerequisites

If http url is used to specify the URL of a remote HTTPS server, the SSL policy should be configured in advance.

Follow-up Procedure

After the configuration file is loaded and replaced, the file enters the candidate configuration database. Run the commit command for relevant configurations to take effect.

Precautions

The specified configuration file to be loaded must exist and meet the following conditions:

  • The configuration file can contain only configuration commands, view switching commands, and # symbols. If you load other types of commands, such as display commands used for query, reset/save/ping commands used for maintenance, quit, commit, return, and upgrade-compatible commands, and one-phase configuration validation commands, the device reports an error and continues to load follow-up commands.
  • The interactive commands in the configuration file support only Y/N automatic interaction.
  • The indentation of commands in the configuration file must be correct. In the configuration file, the commands in the system view and the level-1 view under the system view must be left-aligned, the commands in the level-1 view must be indented by one space, and each subsequent view must be indented by one more space.
  • If the pound sign (#) is left-aligned, the system view is displayed. If the pound sign (#) is indented, it is used only to isolate command blocks; in this case, the pound sign (#) must be aligned with the first command in the following command block. If the pound sign (#) is incorrectly used, configurations may be lost, or commands may be run in an unexpected view.
  • The configuration file name extension must be .zip, .cfg, .txt, .dat, .bat, or name of text file without suffix. FTP or SFTP also supports the file names with a server directory. It is recommended that the directory name contain a slash ("/"). The file name does not support special characters "~" "?" "*" ":" """ "|" "<" ">" "[" "]".
  • Both .cfg and .txt files are text files whose content can be directly viewed. If a .cfg or .txt file is specified as the configuration file to be loaded, the system restores the commands in the file one by one during the replacement process.
  • A .zip file is obtained by compressing a .cfg file, occupying less space. If a .zip file is specified as the configuration file to be loaded, the system decompresses the file into a .cfg file, and then restores the commands in the file one by one. The .cfg file must have the same name as the .zip file. Otherwise, the configuration file fails to be loaded.
  • A .dat file is a compressed file, which can be in binary or text mode. Only a .dat file exported from a Huawei device is supported, and the file cannot be modified manually. Otherwise, the file fails to be loaded.
  • A .bat file is used for batch processing. It is a text file that can be modified manually.

Example

# Load a configuration file named config.cfg.
<HUAWEI> system-view
[~HUAWEI] load configuration file config.cfg merge
# Use SFTP to load the configuration file named config.cfg on the remote server at 10.1.1.1, with the user name and password being huawei and huawei_123, respectively.
<HUAWEI> system-view
[~HUAWEI] load configuration server 10.1.1.1 transport-type sftp username huawei password huawei_123 file config.cfg merge
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >