The load configuration replace command loads the configuration file on a local or remote server to replace the running configuration on the current device.
load configuration file filename replace [ relative ]
load configuration server ip-address [ vpn-instance vpn-instance-name ] transport-type { ftp | sftp } username user-name password password file filename replace [ relative ]
load configuration server ipv6 ipv6-address [ vpn-instance vpn-instance-name ] transport-type { ftp | sftp } username user-name password password file filename replace [ relative ]
load configuration server http url url-address [ vpn-instance vpn-instance-name ] [ file filename ] replace [ relative ]
Parameter | Description | Value |
---|---|---|
relative |
Specifies that only configurations in the current view are replaced. |
- |
server ip-address |
Specifies the IPv4 address of the remote server. |
The value is in dotted decimal notation. |
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 mode. |
- |
ftp |
Transfers files through FTP. |
- |
sftp |
Transfers files through SFTP. |
- |
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 |
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 filename |
Specifies the name of the configuration file to be loaded. |
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 period (.). 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: ~ ? * : " | < > [ ] |
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 path of the configuration file on the remote server. |
The value is a string of 1 to 255 characters. |
Usage Scenario
In the scenario where multiple devices share the same source, to ensure that the configuration data on all devices is consistent, you can use the command in different formats to load the source file to replace the local configuration based on the source location of the configuration file.
The load configuration replace command replaces the entire configurations file or configurations in a specific view. This depends on the content in the loaded configuration file. If relative is specified, only configurations in the current view are replaced.
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
2. After the configuration replacement command is executed, pay attention to the prompt. Ensure that the result is correct and meets the expectation before you run the commit command to commit the configuration. This prevents service functions from being affected if only some configurations are successfully replaced.
3. When loading the configuration file on the specified remote server using ftp/stfp, the remote file will be obtained under the root directory of the device first. Please ensure that there is enough space to store the file and there is no file with the same name.
4. You are not advised to manually create a configuration file. If the format of the constructed configuration file is incorrect, configuration restoration may fail or an error may occur during configuration restoration.
<HUAWEI> system-view [~HUAWEI] load configuration file config.cfg replace
<HUAWEI> system-view [~HUAWEI] load configuration server 10.1.1.1 transport-type sftp username huawei123 password huawei_123 file config.cfg replace
<HUAWEI> system-view [~HUAWEI] ssl policy policy1 [*HUAWEI-ssl-policy-policy1] certificate load pem-cert client.crt key-pair rsa key-file client.key auth-code cipher huawei123 [*HUAWEI-ssl-policy-policy1] signature algorithm-list ecdsa-secp256r1-sha256 ecdsa-secp384r1-sha384 ecdsa-secp521r1-sha512 ed25519 ed448 rsa-pss-pss-sha256 rsa-pss-pss-sha384 rsa-pss-pss-sha512 rsa-pss-rsae-sha256 rsa-pss-rsae-sha384 rsa-pss-rsae-sha512 rsa-pkcs1-sha256 rsa-pkcs1-sha384 rsa-pkcs1-sha512 ecdsa-sha1 ecdsa-sha224 rsa-sha1 rsa-sha224 dsa-sha1 dsa-sha224 dsa-sha256 dsa-sha384 dsa-sha512 [*HUAWEI-ssl-policy-policy1] quit [*HUAWEI] http [*HUAWEI-http] client ssl-policy abc [*HUAWEI-http] quit [*HUAWEI] commit [~HUAWEI] aaa [*HUAWEI-aaa] load configuration server http url https://10.1.1.1/https/config.cfg replace relative