2.3. Using FTP/TFTP/SCP client
Overview
Function Introduction
You can download a switch configuration file from an FTP/TFTP/SCP server or upload the file from the switch to an FTP/TFTP/SCP server. You download a switch configuration file from a server to upgrade the switch configuration. You can overwrite the current startup configuration file with the new one. You upload a switch configuration file to a server for backup purposes. You can use this uploaded configuration for future downloads to the switch or another switch of the same type.
Principle Description
N/A
Configuration
You can copy configurations files to or from an FTP/TFTP/SCP server.
The FTP protocol requires a client to send a remote username and password on each FTP request to a server.
Before you begin downloading or uploading a configuration file by using FTP/TFTP/SCP, do these tasks:
Ensure that the switch has a route to the FTP/TFTP/SCP server. The switch and the FTP/TFTP/SCP server must be in the same network if you do not have a router to route traffic between subnets. Check connectivity to the FTP/TFTP/SCP server by using the ping command.
For FTP, if you are accessing the switch through the console or a Telnet session and you do not have a valid username, make sure that the current FTP username is the one that you want to use for the FTP download.
For FTP, when you upload a configuration file to the FTP server, it must be properly configured to accept the write request from the user on the switch.
For more information, see the documentation for your FTP/TFTP/SCP server.
Downloading a configuration file in IPv4 network
step 1 copy the configuration file
In this example management interfaces is used as a source for FTP session. It is one of possible options, please refer to
copy
command for additional information.
Switch# copy mgmt-if ftp://test:test@10.10.10.163/startup-config.conf flash:/startup-config.conf
step 2 Validation
Use the following command to display the configuration
Switch# show startup-config
Uploading a configuration file by using TFTP in IPv4 network
step 1 copy the configuration file
Switch# copy flash:/startup-config.conf mgmt-if tftp://test:test@10.10.10.163/startup-config.conf
Downloading a configuration file by using SCP in IPv6 network
step 1 copy the configuration file
Switch# copy scp://2001:1000::2/startup-config.conf flash:/startup-config.conf
Uploading a configuration file by using FTP in IPv6 network
step 1 copy the configuration file
Switch# copy flash:/startup-config.conf mgmt-if ftp://root:root@2001:1000::2 startup-config.conf
Application cases
N/A