These commands are used to manage the system code or configuration files.
Use this command to move (upload/download) a code image or configuration file between the switch's Flash memory and a Trivial File Transfer Protocol (TFTP) server. When you save the system code or configuration settings to a file on a TFTP server, that file can later be downloaded to the switch to restore system operation. The success of the file transfer depends on the accessibility of the TFTP server and the quality of the network connection.
Syntax
copy file {file | running-config | startup-config | tftp}
copy running-config {file | startup-config | tftp}
copy startup-config {file | running-config | tftp}
copy tftp {file | running-config | startup-config}
- file - Keyword that allows you to copy to/from a file.
- running-config - Keyword that allows you to copy to/from the current running configuration.
- startup-config - The configuration used for system initialization.
- tftp - Keyword that allows you to copy to/from a TFTP server.
Default Setting
None
Command Mode
Privileged Exec
Command Usage
Example
The following example shows how to upload the configuration settings to a file on the TFTP server:
#copy file tftp
Choose file type:
1. config: 2. opcode: <1-2>: 1
Source file name: startup
TFTP server ip address: 10.1.0.99
Destination file name: startup.01
/
#The following example shows how to copy the running configuration to a startup file.
#copy running-config file
destination file name : startup
/
#The following example shows how to download a configuration file:
#copy tftp startup-config
TFTP server ip address: 10.1.0.99
Source configuration file name: startup.01
Startup configuration file name [startup]:
/
#
Use this command to delete a file or image.
Syntax
delete filename
filename - Name of the configuration file or image.
Default Setting
None
Command Mode
Privileged Exec
Command Usage
Example
This example shows how to delete the test2.cfg configuration file from Flash memory.
#delete test2.cfg
#
Related Commands
Use this command to display a list of files in Flash memory.
Syntax
dir [boot-rom | config | opcode [:filename]]
The type of file or image to display includes:
- boot-ROM - Boot ROM
- config - Configuration file
- opcode - Name of the file or image. If this file exists but contains errors, information on this file cannot be shown.
Default Setting
None
Command Mode
Privileged Exec
Command Usage
Column Heading Description file name The name of the file. file type File types: Boot-ROM, Operation Code, and Config file. startup Shows if this file is used when the system is started. file size The length of the file in bytes.
Example
The following example shows how to display all file information:
#dir
file name file type startup size (byte)
-------------------------------- -------------- ------- -----------
diag_0060 Boot-ROM image Y 111360
run_01642 Operation Code N 1074304
run_0200 Operation Code Y 1083008
Factory_Default_Config.cfg Config File N 2574
startup Config File Y 2710
-------------------------------------------------------------------
Total free space: 0
#
Use this command to display which files booted.
Default Setting
None
Command Mode
Privileged Exec
Example
This example shows the information displayed by the whichboot command. See Table 1 for a description of the file information displayed by this command.
#whichboot
file name file type startup size (byte)
----------------- -------------- ------- -----------
diag_0060 Boot-ROM image Y 111360
run_0200 Operation Code Y 1083008
startup Config File Y 2710
#
Use this command to specify the file or image used to start up the system.
Syntax
boot system {boot-ROM| config | opcode}: filename
The type of file or image to set as a default includes:
- boot-ROM - Boot ROM
- config - Configuration file
- opcode - Run-time operation code
The colon (:) is required.
filename - Name of the configuration file or image name.
Default Setting
None
Command Mode
Global Configuration
Command Usage
- A colon (:) is required after the specified file.
- If the file contains an error, it cannot be set as the default file.
Example
(config)#boot system config: startup
(config)#
Related Commands