Description
Use archive configuration to save the running configuration manually.
With this command executed, the system saves the running configuration with the specified filename — filename prefix + serial number—to the specified path.
Before executing archive configuration, you must configure the filename prefix and path for saving configuration files by using archive configuration location.
Syntax
archive configurationView
User viewDefault level
3: Manage levelParameters
NoneExamples
# Save the running configuration manually. <Sysname> archive configuration
Warning: Save the running configuration to an archive file. Continue? [Y/N]: Y Please wait...
Info: The archive configuration file myarchive_1.cfg is saved.
archive configuration interval
Description
Use archive configuration interval to enable the automatic saving of the running configuration and set the
interval.
Use undo archive configuration interval to restore the default.
By default, the system does not automatically save the running configuration.
With this command executed, the system saves the running configuration with the specified filename to the specified path at a specified interval (the value of the minutes argument).
Configure an automatic saving interval according to the storage media performance and the frequency of configuration modification:
If the configuration of the device does not change frequently, HP recommends saving the running configuration manually as needed.
If you use a low-speed storage media, such as a flash, HP recommends saving the running configuration manually, or configuring automatic saving with an interval longer than 1,440 minutes (24 hours).
If you use a high-speed storage media—such as a CF card—and the configuration of the device changes frequently, HP recommends setting a shorter saving interval.
Before executing archive configuration interval, you must configure the filename prefix and path for saving configuration files by using archive configuration location.
Syntax
archive configuration interval minutes undo archive configuration interval
View
System view
Default level
3: Manage level
Parameters
minutes: Specifies the interval for automatically saving the running configuration, in minutes. The value ranges from 10 to 525,600 (365 days).
Examples
# Configure the system to save the running configuration every 60 minutes. <Sysname> system-view
[Sysname] archive configuration interval 60
Info: Archive files will be saved every 60 minutes.
archive configuration location
Description
Use archive configuration location to configure the path and filename prefix for saving configuration files. Use undo archive configuration location to restore the default.
By default, the path and filename prefix for saving configuration files are not configured, and the system does not save the configuration file periodically.
Before the running configuration is saved either manually or automatically, the file path and filename prefix must be configured.
If undo archive configuration location is executed, the running configuration cannot be saved manually or
automatically. The configuration done by executing archive configuration interval and archive configuration max will restore to the default, and clear the saved configuration files.
Syntax
archive configuration location directory filename-prefix filename-prefix undo archive configuration location
View
Default level
3: Manage level
Parameters
directory: The path of the folder for saving configuration files, a case-insensitive string of 1 to 63 characters, in the format of storage media name:/[folder name]/subfolder name. The folder must be created before the configuration.
filename-prefix: The filename prefix for saving configuration files, a case-insensitive string of 1 to 30 characters (can include letters, numbers, _, and - only).
Examples
# Configure the path and the filename prefix for saving configuration files as flash:/archive/ and my_archive, respectively.
<Sysname> mkdir archive .
%Created dir flash:/archive. <Sysname> system-view
[Sysname] archive configuration location flash:/archive filename-prefix my_archive
archive configuration max
Description
Use archive configuration max to set the maximum number of configuration files being saved.
Use undo archive configuration max to restore the default.
By default, a maximum of 5 configuration files can be saved.
Because excessive configuration files occupy large memory space, you can use this command to control the number of the files. After the maximum number of configuration files is saved, the system deletes the oldest files when the next file is saved (either automatically or manually). When you change the maximum number of configuration files being saved, the exceeded files are not deleted. If the number of the existing configuration files is larger than or equal to the newly configured upper limit, the system deletes the oldest n files when the next file is saved, where n = the current number - the newly configured number + 1, for example: if the number of configuration files saved is 7, and the newly configured upper limit is 4, when there is a new configuration file to be saved, the system deletes 4 oldest files, where 4 = 7-4+1.
Before executing this command, configure the path and filename prefix for saving configuration files by using archive configuration location; otherwise, the execution of this command fails.
If undo archive configuration location is executed, the maximum number of configuration files being saved also restores to the default.
Syntax
archive configuration max file-number
undo archive configuration max
View
System view
Default level
Parameters
file-number: The maximum number of configuration files being saved, which ranges from 1 to 10. The value of the file-number argument is determined by the memory space. HP recommends setting a comparatively small value for this argument if the available memory space is small.
Examples
# Set the maximum number of configuration files being saved to 10. <Sysname> system-view
[Sysname] archive configuration max 10
backup startup-configuration
Description
Use backup startup-configuration to back up the startup configuration file (used at the next system startup)
to a specified TFTP server. If you do not specify this filename, the original filename is used. This command only backs up the main startup configuration file.
The device uses TFTP to back up configuration files.
Syntax
backup startup-configuration to dest-addr [ dest-filename ]
View
User view
Default level
2: System level
Parameters
dest-addr: IPv4 address or name of a TFTP server. It is a string of 1 to 20 characters.
dest-filename: Target filename used to save the startup configuration file for the next system startup on the server.
Examples
# Back up the startup configuration file of the device to the TFTP server with IP address 2.2.2.2, using filename 192-168-1-26.cfg.
<Sysname> display startup
Current startup saved-configuration file: flash:/config.cfg Next startup saved-configuration file: flash:/test.cfg <Sysname> backup startup-configuration to 2.2.2.2 192-168-1-26.cfg Backup next startup-configuration file to 2.2.2.2, please wait…finished! <Sysname>
After the above operation, the device backs up file test.cfg to TFTP server 2.2.2.2, where the file is saved as 192-168-1-26.cfg.