< Home

set save-configuration

Function

The set save-configuration command enables the function of saving system configurations periodically.

The undo set save-configuration command disables the function of saving system configurations periodically.

By default, the system does not periodically save configurations.

Format

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

undo set save-configuration [ interval | cpu-limit | delay ] *

undo set save-configuration [ interval interval | cpu-limit cpu-usage | delay delay-interval ] *

Parameters

Parameter Description Value
interval interval Specifies the interval for saving configurations. The value is an integer that ranges from 30 to 43200, in minutes. The default value is 30.
cpu-limit cpu-usage

Specifies the threshold of the CPU usage during the periodic save operation.

The value is an integer that ranges from 1 to 60. The default value is 50.
delay delay-interval Specifies the delay in automatic backup after the configuration changes.
NOTE:

If a configuration change occurs within the configured delay time, the device restarts the timer.

The value is an integer that ranges from 1 to 60, in minutes. The default value is five minutes. The value of delay-interval must be less than the value of interval.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

After this command enables the function of saving system configurations periodically, the configuration file will not be lost if the device is powered off or restarts.

If the set save-configuration command is not executed, the system does not enable the function of saving system configurations periodically.

If the set save-configuration command is executed, the system compares the configuration files before saving configurations. If the configurations do not change, the system does not save the configurations.

  • You can specify interval interval to set the interval for periodically saving configurations. The system saves the current configurations only when the configurations have been changed and are not saved. The default interval is 0 seconds, indicating that the system does not save the configurations. After the automatic save function is enabled, the default interval is 30 minutes if interval is not specified.

  • If cpu-limit cpu-usage is specified, the automatic save function does not affect system performance. After the automatic save timer is triggered, the system cancels the current automatic save operation if the system CPU usage is detected to be higher than the upper limit. The default upper limit of the CPU usage is 50% for the automatic save function.
  • After delay delay-interval is specified, the system saves the changed configurations after the specified delay. The default value is 5 minutes.

The undo set save-configuration command disables the automatic save function. The undo set save-configuration command with a parameter specified restores the default value of the parameter and the automatic save function still takes effect.

Follow-up Procedure

Run the display saved-configuration configuration command to check the configurations about the periodic save function.

Precautions

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.
After the automatic save function is enabled, the configurations are saved in the configuration file for the next startup. The content in the configuration file changes when the configuration changes. 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.

Example

# Set the automatic save interval to 60 minutes.

<HUAWEI> system-view
[HUAWEI] set save-configuration interval 60

# Configure the system to save the new configuration 3 minutes after the configuration changes at an interval of 10 hours when the upper limit of the CPU usage is 60%.

<HUAWEI> system-view
[HUAWEI] set save-configuration interval 600 delay 3 cpu-limit 60
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >