- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-Configuration File Management Commands | 138.75 KB |
Contents
Configuration file management commands
archive configuration interval
archive configuration location
archive configuration
Syntax
archive configuration
View
User view
Default level
3: Manage level
Parameters
None
Description
Use the archive configuration command to manually save the current running configuration.
The command saves the current running configuration with the specified filename (filename prefix + serial number) to the specified path.
Before executing the archive configuration command, you must configure the filename prefix and path for saving configuration files by using the archive configuration location command.
With the archive configuration command executed, the running configuration is only saved to the active main board (AMB), and the standby main board (SMB) does not perform the saving operation.
In IRF mode, after execution of the archive configuration command, the current running configuration is only saved to the AMB of the IRF fabric, and the other main boards of the IRF fabric do not perform the saving operation.
Examples
# Manually save the current running configuration.
<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
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 current running configuration, in minutes. The value ranges from 10 to 525,600 (365 days).
Description
Use the archive configuration interval command to enable the automatic saving of the current running configuration and set the interval.
Use the undo archive configuration interval command to restore the default.
By default, the system does not automatically save the current running configuration.
After the execution of this command, the system saves the current 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 switch does not change frequently, you are recommended to save the current running configuration manually as needed
· If a low-speed storage media (such as a Flash) is used, you are recommended either to save the current running configuration manually, or to configure automatic saving with an interval longer than 1,440 minutes (24 hours).
· If a high-speed storage media (such as a CF card) is used and the configuration of the switch changes frequently, you are recommended to set a shorter saving interval.
Before executing the archive configuration interval command, you must configure the filename prefix and path for saving configuration files by using the archive configuration location command.
When the archive configuration interval command is executed, the current running configuration is only saved to the AMB, and the SMB cannot save the configuration. However, the command is also executed on the SMB to ensure the rollback of the configuration after an active/standby switchover.
In IRF mode, after execution of the archive configuration interval command, the current running configuration is only saved to the AMB of the IRF fabric, and the other main boards do not save the configuration. However, the command is also executed on the other main boards of the IRF fabric to ensure the rollback of the configuration after an AMB change.
Examples
# Configure the system to save the current 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
Syntax
archive configuration location directory filename-prefix filename-prefix
undo archive configuration location
View
System 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, which is a case-insensitive string of 1 to 30 characters that can include letters, numbers, _, and - only.
Description
Use the archive configuration location command to configure the filename prefix and path for saving configuration files.
Use the undo archive config location command 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 current running configuration is saved either manually or automatically, the file path and filename prefix must be configured.
When the undo archive config location command is executed, the current running configuration can neither be saved manually nor automatically, and the configuration by executing the archive configuration interval and archive configuration max commands restores to the default, meanwhile, the saved configuration files are cleared.
In standalone mode, the saving and rollback operations are executed only on the AMB. After the active/standby switchover, the configuration rollback can take effect on the new AMB. The archive configuration location command configures the path and filename prefix for saving configuration files on both the AMB and SMB. Before executing this command, verify that the path is available on both the AMB and SMB. The path cannot include any slot number.
In IRF mode, the saving and rollback operations are executed only on the AMB of the IRF fabric. To make the configuration rollback take effect on the new AMB after an AMB change, execute the archive configuration location command to specify the path and filename prefix for saving configuration files on all the main boards of the IRF fabric. Therefore, before the execution of this command, make sure that the specified path is available on all the main boards of the IRF fabric, and the path cannot include any member ID.
Examples
# Configure the path and the filename prefix for saving configuration files as flash:/archive and my_archive respectively.
<Sysname> system-view
[Sysname] archive configuration location flash:/archive filename-prefix my_archive
# In IRF mode, configure the path and the filename prefix for saving configuration files as flash:/archive/ and my_archive respectively.
· Create folder flash:/archive on the AMB of the IRF fabric.
<Sysname> mkdir archive
.
%Created dir flash:/archive.
· Create folder flash:/archive on an SMB of the IRF fabric (the member ID and slot number of the switch where the SMB resides are 2 and 1 respectively).
<Sysname> mkdir chassis2slot1#flash:/archive
%Created dir chassis2slot1flash:/archive.
· Configure the path and the filename prefix for saving configuration files.
<Sysname> system-view
[Sysname] archive configuration location flash:/archive filename-prefix my_archive
archive configuration max
Syntax
archive configuration max file-number
undo archive configuration max
View
System view
Default level
3: Manage level
Parameters
file-number: The maximum number of configuration files that can be saved, which ranges from 1 to 10. The value of the file-number argument is determined by the memory space. You are recommended to set a comparatively small value for this argument if the available memory space is small.
Description
Use the archive configuration max command to set the maximum number of configuration files that can be saved.
Use the undo archive configuration max command 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 that can be 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 that have been 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 the archive configuration location command; otherwise, the execution of this command fails.
When the undo archive configuration location command is executed, the maximum number of configuration files that can be saved also restores to the default.
Examples
# Set the maximum number of configuration files that can be saved to 10.
<Sysname> system-view
[Sysname] archive configuration max 10
backup startup-configuration
Syntax
backup startup-configuration to dest-addr [ dest-filename ]
View
User view
Default level
2: System level
Parameters
dest-addr: IPv4 address or host name of a TFTP server, a string of 1 to 20 characters.
dest-filename: Target filename with the extension .cfg that is used to save the startup configuration file for the next system startup on the server.
Description
Use the backup startup-configuration command to backup 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.
Presently, the switch uses TFTP to back up configuration files.
Examples
# Back up the startup configuration file of the switch to the TFTP server with IP address 2.2.2.2, using filename 192-168-1-26.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!
configuration replace file
Syntax
configuration replace file filename
View
System view
Default level
3: Manage level
Parameters
filename: Specifies the name of the replacement configuration file for configuration rollback.
Description
Use the configuration replace file command to set configuration rollback.
After the execution of this command, the current running configuration rolls back to the configuration state based on the specified configuration file (filename).
The configuration file specified with the configuration replace file filename command can only be a configuration file in simple text. Otherwise, errors may occur in configuration rollback.
Examples
# Roll back from the current running configuration to a previous configuration state based on a saved configuration file my_archive_1.cfg.
<Sysname> system-view
[Sysname] configuration replace file my_archive_1.cfg
Current configuration will be lost, save current configuration? [Y/N]:n
Info: Now replacing the current configuration. Please wait...
Info: Succeeded in replacing current configuration with the file my_archive_1.cfg.
display archive configuration
Syntax
display archive configuration [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display archive configuration command to display the information about configuration rollback.
Examples
# Display the information about configuration rollback.
<Sysname> display archive configuration
Location: flash:/archive
Filename prefix: my_archive
Archive interval in minutes: 120
Maximum number of archive files: 10
Saved archive files:
No. TimeStamp FileName
1 Aug 05 2007 20:24:54 my_archive_1.cfg
2 Aug 05 2007 20:34:54 my_archive_2.cfg
# 3 Aug 05 2007 20:44:54 my_archive_3.cfg
‘#’ indicates the most recent archive file.
Next archive file to be saved: my_archive_4.cfg
Table 1 Output description
Field |
Description |
Location |
Absolute path of the saved configuration files. |
Archive interval in minutes |
Configuration file saving interval, in minutes. If the automatic saving is disabled, this field is not displayed. |
display current-configuration
Syntax
display current-configuration [ [ configuration [ configuration ] | controller | interface [ interface-type ] [ interface-number ] | exclude modules ] [ by-linenum ] [ | { begin | exclude | include } regular-expression ] ]
View
Any view
Default level
2: System level
Parameters
configuration [ configuration ]: Displays non-interface configuration. If no parameter is used, all the non-interface configuration is displayed; if parameters are used, the command displays the specified information.
interface [ interface-type ] [ interface-number ]: Displays the interface configuration, where interface-type represents the interface type and interface-number represents the interface number.
exclude modules: Excludes the configuration of the specified modules. The modules argument can be acl, acl6, or both separated by a space.
· acl: Excludes the IPv4 ACL configuration.
· acl6: Excludes the IPv6 ACL configuration.
by-linenum: Display the number of each line.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display current-configuration command to display the current configuration.
A parameter is not displayed if it adopts the default setting. A changed parameter may not be displayed as configured because the system may need to adjust it to meet the requirement. For example, configure ip address 11.11.11.11 24 on a Loopback interface. Then execute the display current-configuration command. ip address 11.11.11.11 255.255.255.255 is displayed, meaning the system has changed the subnet mask to 32 bits.
Related commands: display saved-configuration, reset saved-configuration, and save.
Examples
# Display the configuration from the line containing “user-interface” to the last line of the current configuration.
<Sysname> display current-configuration | begin user-interface
user-interface con 0 1
user-interface aux 0 1
user-interface vty 0 4
authentication-mode none
user privilege level 3
#
return
display default-configuration
Syntax
display default-configuration [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display default-configuration command to display the factory defaults of the switch. The command displays all commands to be executed when the switch boots with the factory defaults.
Related commands: display current-configuration, reset saved-configuration, and save .
Examples
# Display the factory defaults of the switch.
<Sysname> display default-configuration
display saved-configuration
Syntax
display saved-configuration [ by-linenum ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
2: System level
Parameters
by-linenum: Identifies each line of displayed information with a line number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display saved-configuration command to display the contents of the configuration file saved for the next startup of the switch.
During switch management and maintenance, you can use this command to check whether important configurations are saved to the configuration file to be used for the next startup of the switch.
If the system is not specified with a configuration file for the next startup or the specified configuration file does not exist, no information will be displayed when you execute the display saved-configuration command.
Related commands: display current-configuration, reset saved-configuration, and save.
Examples
# Display the configuration file saved for the next startup of the switch.
<Sysname> display saved-configuration
#
version 5.20, Release 2127
#
sysname H3C
#
domain default enable system
#
telnet server enable
#
mac-address timer no-aging
#
xbar load-balance
#
vlan 1
#
vlan 100
#
vlan 1000
#
domain system
access-limit disable
state active
self-service-url disable
---- More ----
The configurations are displayed in the order of global, port, and user interface. “ ---- More ----” means that all information on this screen has been displayed, and if you press the Space key, the next screen will be displayed.
# Display the contents of the currently running configuration file saved on the storage medium of the switch with a number identifying each line.
<Sysname> display saved-configuration by-linenum
1: #
2: version 5.20, Release 2127
3: #
4: sysname H3C
5: #
6: domain default enable system
7: #
8: telnet server enable
9: #
10: mac-address timer no-aging
11: #
12: xbar load-balance
13: #
14: vlan 1
15: #
16: vlan 100
17: #
18: vlan 1000
19: #
20: domain system
21: access-limit disable
22: state active
23: self-service-url disable
---- More ----
“ ---- More ----” means that all information on this screen has been displayed, and if you press the Space key, the next screen will be displayed.
|
NOTE: The output information in the example depends on the actual output information of the switch. |
display startup
Syntax
display startup [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display startup command to display the configuration file used at the current system startup and the configuration file(s) to be used at the next system startup.
The SMB is started and runs based on the current configurations of the AMB; therefore the current startup configuration files displayed on the AMB and SMB are always the same.
After a switchover between the AMB and SMB, the new AMB does not restart using the configuration file but runs with the current configuration instead. Therefore, when you execute the display startup command, the startup configuration file used for the current startup of the new AMB is displayed as NULL and that of the new SMB is also NULL to keep consistent with the new AMB.
Related commands: startup saved-configuration.
Examples
# Display the startup configuration file used at the current system startup and the one to be used at the next system startup.
<Sysname> display startup
Current startup saved-configuration file: flash:/testcfg.cfg
Next startup saved-configuration file: flash:/testcfg.cfg
# Display the startup configuration file used at the current system startup and the one to be used at the next system startup in IRF mode.
<Sysname> display startup
MainBoard:
Current startup saved-configuration file: flash:/testcfg.cfg
Next startup saved-configuration file: flash:/testcfg.cfg
Chassis 2 Slot 0:
Current startup saved-configuration file: flash:/testcfg.cfg
Next startup saved-configuration file: flash:/testcfg.cfg
Table 2 Output description
Field |
Description |
Current Startup saved-configuration file |
Configuration file used for the current startup |
Next startup saved-configuration file |
Configuration file used for the next startup |
MainBoard: |
Configuration files used for the current and the next startup of the master |
Chassis 2 Slot 0: |
Configuration files used for the current and the next startup of card 0 on member 2 |
display this
Syntax
display this [ by-linenum ] [ | { begin | exclude | include } regular-expression ]
Any view
Default level
1: Monitor level
Parameters
by-linenum: Displays the number of each line.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Use the display this command to display the valid configuration information under the current view.
To check whether your configuration takes effect, use the display this command.
The valid configuration that is the same as the default is not displayed.
The invalid configuration is not displayed.
Execution of this command in any user interface view displays the valid configuration in all the user interfaces.
Execution of this command in any VLAN view displays the configurations of all the created VLANs.
Examples
# Display the valid configuration information on interface GigabitEthernet 3/0/1 (the output information depends on the current configuration of the switch).
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] display this
#
interface GigabitEthernet 3/0/1
port link-mode bridge
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 2 to 4 untagged
port hybrid pvid vlan 2
#
Return
# Display the valid configuration information of all user interfaces (the output information depends on the current configuration of the switch).
<Sysname> system-view
[Sysname] user-interface vty 0
[Sysname-ui-vty0] display this
#
user-interface con 0
user-interface vty 0
history-command max-size 256
user-interface vty 1 4
#
return
reset saved-configuration
Syntax
reset saved-configuration
View
User view
Default level
3: Manage level
Parameters
None
Description
Use the reset saved-configuration command to delete the startup configuration file.
Delete the startup configuration file if it does not match the software version or has been corrupted.
Use this command with caution. In standalone mode, this command permanently deletes the startup configuration file from the AMB and SMB. In IRF mode, this command permanently deletes the startup configuration file from all the AMB and SMB of every IRF member switch.
Related commands: display saved-configuration and save.
Examples
# In standalone mode, delete the startup configuration file.
<Sysname> reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]:y
Configuration file in flash is being cleared.
Please wait ...
..
MainBoard:
Configuration file is cleared.
Slot 0:
Erase next configuration file successfully
# In IRF mode, delete the startup configuration file.
<Sysname> reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]:y
Configuration file in flash is being cleared.
Please wait ...
..
MainBoard:
Configuration file is cleared.
Chassis 2 Slot 0:
Erase next configuration file successfully
restore startup-configuration
Syntax
restore startup-configuration from src-addr src-filename
View
User view
Default level
3: Manage level
Parameters
src-addr: IP address or name of a TFTP server. The address cannot be an IPv6 address.
src-filename: Filename of the configuration file to be downloaded from the specified server.
Description
Use the restore startup-configuration command to download a configuration file from the specified TFTP server to the switch and specify the configuration file as the startup configuration file to be used at the next startup of the switch.
Used in standalone mode, this command downloads the configuration file to the root directory of the storage medium of the AMB and SMB and specifies the file as the startup configuration file to be used at the next startup of the AMB and SMB. If the file to be downloaded has the same filename as an existing file on the AMB or SMB, you will be prompted whether you want to overwrite the existing file or not. In addition, both the AMB and the SMB are assumed to use the storage media of the same type when the switch is checking the filename or backing up the configuration file to the SMB. When backing up the configuration file to the SMB, the switch saves the file to the same directory on the SMB as on the AMB, that is, the root directory. (For a switch whose storage medium has been partitioned, the directory is the first partition of the storage medium.) If the storage media of the AMB and the SMB are of different types, for example, a flash and a CF card respectively, the backup operation will fail.
Used in IRF mode, this command downloads the configuration file to the root directory of the storage medium of each main board of the IRF fabric and specifies the file as the startup configuration file to be used at the next startup of all the main boards. If the file to be downloaded has the same filename as an existing file on a member switch, you will be prompted whether you want to overwrite the existing file or not. In addition, both the AMB and an SMB of the IRF fabric are assumed to use the storage media of the same type when the switch is checking the filename or backing up the configuration file to the SMB of the IRF fabric. When backing up the configuration file to the SMB of the IRF fabric, the switch saves the file to the same directory on the SMB of the IRF fabric as on the AMB of the IRF fabric, that is, the root directory. (For a switch whose storage medium has been partitioned, the directory is the first partition of the storage medium.) If the storage media of the AMB and the SMB of the IRF fabric are of different types, for example, a flash and a CF card respectively, the backup operation will fail.
Examples
# Download configuration file config.cfg from the TFTP server whose IP address is 2.2.2.2, and the configuration file is to be used at the next startup of the switch.
<Sysname>restore startup-configuration from 2.2.2.2 config.cfg
Restore next startup-configuration file from 2.2.2.2. Please wait...finished!
Now restore next startup-configuration file from main to slave board. Please wait...finished!
# In IRF mode, download file config.cfg from the TFTP server whose IP address is 2.2.2.2, and the file is to be used as the main configuration file to be used at the next startup of the switch.
<Sysname> restore startup-configuration from 2.2.2.2 config.cfg
Restore next startup-configuration file from 2.2.2.2. Please wait...finished!
Now restore next startup-configuration file from main to slave board. Please wait...finished!
save
Syntax
Standalone mode:
save [ file-url [ all | slot slot-number ] | safely ] [ force ]
IRF mode:
save [ file-url [ all | chassis chassis-number slot slot-number ] | safely ] [ force ]
View
Any view
Default level
2: System level
Parameters
file-url: File name, whose extension name must be .cfg. When used with the keyword all or slot, this argument can only be a file name or in the format of folder name + file name, and cannot include a slot number. If the folder name is included, you must first create the folder on the specified main board; otherwise, the operation will fail.
all: Saves the current configuration in the specified filename to all the main boards. (standalone mode)
all: Saves the current configuration in the specified filename to all member switches of an IRF fabric. (IRF mode)
slot slot-number: Specifies a main board by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a main board on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the main board. You can display the member ID and slot number with the display device command. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
safely: Sets the configuration saving mode to safe. If this argument is not specified, the configuration file is saved in fast mode.
force: Saves the current configuration to the configuration file for the next startup of the switch, and the system does not output any interaction information. By default, when you execute the save command, the system asks you to input Y or N to confirm your operation. If you do not confirm your operation within 30 seconds, the system automatically quits the operation. If you provide the force keyword when executing the save command, the system directly saves the current configuration, not requiring any confirmation.
Description
· In standalone mode:
Use the save file-url [ all | slot slot-number ] command to save the current configuration to the specified configuration file, but the system will not specify the file as the startup configuration file to be used at the next system startup. If the file specified by file-url does not exist, the system creates the file and then saves the configuration to the file.
Use the save [ safely ] [ force ] command to save the current configuration to the root directory of the storage media, and specify the file as the startup configuration file to be used at the next system startup.
Whether the save [ safely ] [ force ] command or the save file-url all command+Enter takes effect on both the AMB and SMB or only on the AMB depends on whether the configuration file auto-save function is enabled.
· In IRF mode:
Use the save file-url [ all | chassis chassis-number slot slot-number ] command to save the current configuration to the specified configuration file, but the system will not specify the file as the startup configuration file for the next system startup. If the file specified by file-url does not exist, the system creates the file and then saves the configuration to the file; if the all keyword or chassis chassis-number slot slot-number option is not specified, the configuration is saved to the AMB of the IRF fabric.
Use the save [ safely ] [ force ] command to save the current configuration to the root directory of the storage medium on a member switch, and specify the file as the startup configuration file to be used at the next system startup.
Whether the save [ safely ] [ force ] command or the save file-url all command+Enter takes effect on all the main boards or on the AMB of the IRF fabric depends on whether the configuration file auto-save function is enabled.
Related commands: display current-configuration, display saved-configuration, reset saved-configuration, and slave auto-update config.
|
NOTE: When you use the save [ safely ] [ force ] command to save the current configuration to the root directory of the storage medium on a member switch, and specify the file as the startup configuration file to be used at the next system startup, you are not recommended to specify the path for saving configuration files as a USB disk. |
Examples
# Save the current configuration file to the default directory.
<Sysname> save
The current configuration will be written to the device.
Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/testcfg.cfg](To leave the
existing filename unchanged, press the enter key):
flash:/testcfg.cfg exists, overwrite?[Y/N]:y
Validating file. Please wait...
Now saving current configuration to the device.
Saving configuration flash:/testcfg.cfg. Please wait...
.
Configuration is saved to flash successfully.
<Sysname>
# Save the current configuration in the name of test.cfg to all main boards.
<Sysname> save test.cfg all
The current configuration will be saved to flash:/test.cfg. Continue? [Y/N]:y
Now saving current configuration to the device.
Saving configuration flash:/test.cfg. Please wait...
...
Configuration is saved to flash successfully.
Slot 7:
Configuration is saved to flash successfully.
Slot 8:
Configuration is saved to flash successfully.
<Sysname>
slave auto-update config
Syntax
slave auto-update config
undo slave auto-update config
View
System view
Default level
2: System level
Parameters
None
Description
Use the slave auto-update config command to enable the configuration file auto-save function.
Use the undo slave auto-update config command to disable the function.
By default, the configuration file auto-save function is enabled.
Examples
# Enable the configuration file auto-save function.
<Sysname> system-view
[Sysname] slave auto-update config
startup saved-configuration
Syntax
startup saved-configuration cfgfile
undo startup saved-configuration
View
User view
Default level
3: Manage level
Parameters
cfgfile: Configuration file name. The file must be a file with an extension .cfg stored in the root directory of the storage media (For a switch that has been partitioned, the file must be saved in the first partition).
Description
· In standalone mode:
Use the startup saved-configuration command to specify a startup configuration file (the configuration file to be used at the next system startup) for the AMB and SMB.
Use the undo startup saved-configuration command to configure the AMB and SMB to start up with the null configuration, or, the factory configuration.
· In IRF mode:
Use the startup saved-configuration command to specify a startup configuration file to be used at the next system startup for each main board of the IRF fabric.
Use the undo startup saved-configuration command to configure all the main boards to start up with the null configuration, that is, the factory configuration.
Related commands: display startup.
|
NOTE: · During the switch boot process, the switch cannot read data from the USB disk. Therefore, do not save the boot file on the USB disk. · The specified file must be ended with a .cfg extension and saved in the root directory of the storage medium (For a storage medium that has been partitioned, the file must be saved on the first partition). |
Examples
# Specify a startup configuration file to be used at the next system startup.
<Sysname> startup saved-configuration testcfg.cfg
Please wait ....... Done!
# In IRF mode, specify a startup configuration file to be used at the next system startup.
<Sysname> startup saved-configuration testcfg.cfg
Please wait ...
Setting the master board ..........
... Done!
Setting the slave board ...
Chassis 2 Slot 0: