Parameter | Description | Value |
---|---|---|
local-filename | Specifies a local file name on the SFTP client. | The value is a case-insensitive character string without spaces. The file name (including the absolute path) contains 1 to 64 characters. |
remote-filename | Specifies the name of the file uploaded to the remote SFTP server. | The value is a case-insensitive character string without spaces. The file name (including the absolute path) contains 1 to 64 characters. |
Usage Scenario
This command enables you to upload files from the local device to a remote SFTP server to view the file contents or back up the files. For example, you can upload log files of a device to an SFTP server and view the logs in the server. During an upgrade, you can upload the configuration file of the device to the SFTP server for backup.
Precautions
If remote-filename is not specified, the uploaded file is saved on the remote SFTP server with the original file name.
If the specified remote-filename is the same as an existing file name on the SFTP server, the uploaded file overwrites the existing file on the server.
The file system has a restriction on the number of files in the root directory. Therefore, if more than 50 files exist in the root directory, creating new files in this directory may fail.
# Upload a file to the SFTP server.
<HUAWEI> system-view [HUAWEI] sftp 10.137.217.201 Please input the username:admin Trying 10.137.217.201 ... Press CTRL+K to abort Connected to 10.137.217.201 ... Enter password:
sftp-client> put wm.cfg
local file: wm.cfg ---> Remote file: /wm.cfg
Info: Uploading file successfully ended.