157
Parameters
directory: Specifies the archive directory, a case-insensitive string of 1 to 63 characters. The value
for this argument must take the format of storage-medium-name:/folder-name. The directory must
already exist on the master.
filename-prefix: Specifies a file name prefix for configuration archives, a case-insensitive string of 1
to 30 characters. Valid characters are letters, digits, underscores (_), and hyphens (-).
Usage guidelines
Before archiving the running configuration, either manually or automatically, you must set a directory
and file name prefix for configuration archives.
Configuration archives are named in the format of prefix_serial number.cfg, for example,
archive_1.cfg and archive_2.cfg. The serial number is automatically assigned from 1 to 1000,
increasing by 1. After the serial number reaches 1000, it restarts from 1.
If you change the file directory or file name prefix, or reboot the device, the following events occur:
• The old configuration archives change to common configuration files.
• The configuration archive counter is reset.
• The display archive configuration command no longer displays the old configuration
archives.
• The serial number for new configuration archives starts at 1.
The undo archive configuration location command removes the configuration archive directory
and file name prefix settings. The command also performs the following operations:
• Disables the configuration archive feature (both manual and automatic methods).
• Restores the default settings of the archive configuration interval and archive
configuration max commands.
• Clears the configuration archive information displayed by using the display archive
configuration command.
Examples
# Set the configuration archive directory as flash:/archive and the archive file name prefix as
my_archive.
<Sysname> mkdir flash:/archive
Creating directory flash:/archive... Done.
<Sysname> system-view
[Sysname] archive configuration location flash:/archive filename-prefix my_archive
Related commands
archive configuration
archive configuration location
archive configuration max
display archive configuration
archive configuration max
Use archive configuration max to set the maximum number of configuration archives.
Use undo archive configuration max to restore the default.
Syntax
archive configuration max file-number
undo archive configuration max