< Home

Saving the Configuration File

Context

You can run commands to modify the current configuration of the device, but the modified configuration will be lost after the device restarts. To enable the new configuration to still take effect after a restart, save the current configuration in the configuration file before restarting the device. Use either of the following methods to save the current configuration:
  • Configure the automatic save function.
  • Manually save the configuration.

Other users cannot perform configuration while the system is saving configuration files. Other users cannot save configuration files while the current user is performing configuration.

Procedure

  • Save the configurations automatically.

    1. Run system-view

      The system view is displayed.

    2. Run set save-configuration [ interval interval | cpu-limit cpu-usage | delay delay-interval ] *

      The system is configured to periodically save configurations.

      By default, the system does not periodically save configurations.

      Before saving configurations, the system compares the configurations with those in the configuration file. Automatic saving of configurations is triggered in the following scenarios:
      • The configurations are inconsistent with those saved last time.
      • The configurations are the same as those saved last time, but changes have been made. For example, if a command is run and then its configurations are deleted, automatic saving of configurations will still be triggered although configurations are the same as those saved last time.
      The system cancels the automatic save operation when:
      • Content is being written into the configuration file.
      • The configurations are being recovered.
      • The CPU usage is excessively high.
    3. (Optional) Run set save-configuration backup-to-server server server-ip [ vpn-instance vpn-instance-name ] transport-type { ftp | sftp } [ port port-number ] user user-name password password [ path path ] or set save-configuration backup-to-server server server-ip [ vpn-instance vpn-instance-name ] transport-type tftp [ path path ]

      The server information is configured. The information includes the IP address of the server to which the configuration is automatically saved, user name and password, port number, the path to save the configuration file, and the mode in which the configuration file is transmitted to the server.

      Before transferring the configuration file using TFTP, run the tftp client-source command to configure the loopback interface on the device as the client source address or source interface.

      SFTP has higher security and is recommended for transferring the configuration file to the file server.

  • Save the configurations manually.

    • Run save [ all ] [ force ] [ configuration-file ]

      The current configuration is saved.

      The configuration file name extension must be .zip or .cfg. The system startup file must be stored in the root directory of the storage device.

      • If you do not specify configuration-file when saving the configuration file for the first time, the system asks you whether to save the configuration file as vrpcfg.zip. The vrpcfg.zip file is the default system configuration file with empty configurations in initial state.
      • If you do not specify configuration-file, configurations are saved to the current startup configuration file. You can run the display startup command to check the name of the current startup configuration file.
      • You can run the pwd command to check the current storage directory.
      • You can run the cd command to modify the current storage directory.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >