FBBR – Troubleshooting – SFTP
November 28, 2023
FBBR – Troubleshooting – SFTP Retention
November 30, 2023
FBBR – Troubleshooting – SFTP
November 28, 2023
FBBR – Troubleshooting – SFTP Retention
November 30, 2023

FBBR – Troubleshooting – SFTP Backup

Using Filezilla

You can validate the sftp server using Filezilla.

Via Filezilla, you can validate the Directory and file creation also file deletion.

Using WinSCP

WinSCP also can be used to validate SFTP Server

You can also validate the available space on the SFTP Server via WinSCP.

Right-click the session and select Server/Protocol Information.

Using vCenter

Using curl

You can use -k or –insecure to bypass key validation and use the credentials for transfer.

To list the files

curl -k -v sftp://<SFTP_SERVER>/<DIRECTORY>/ -u <SFTP_USER>

To download a file from sftp server.

curl -v -k sftp://<SFTP_SERVER>/<DIRECTORY>/<FILE_NAME> -u user1 -o <LOCAL_FILE_NAME>

To upload a file to SFTP Server

curl -v -k -T <LOCAL_FILE> sftp://<SFTP_SERVER>/<DIRECTORY>/ -u <USERNAME>

Using SFTP Utility

https://www.tecmint.com/sftp-command-examples/

vCenter has a sftp utility which can be used to upload and download files from an SFTP Server.

# sftp <username>@<SFTP_SERVER>

For help on the syntax

sftp> ?

To download a file

> get <REMOTE_FILE> /<LOCAL_PATH>/<LOCAL_FILE>

sftp> get vpxd.gz /var/core/vpxd.gz
Fetching /srv/ftp/VMware/vCenter/sn_vc70b.vmware.local/M_7.0.2.00200_20210616-104539_/vpxd.gz to /var/core/vpxd.gz
/srv/ftp/VMware/vCenter/sn_vc70b.vmware.local/M_7.0.2.00200_20210616-104539_/vpxd.gz 100% 57 43.9KB/s 00:00

To upload a file

> put /<LOCAL_PATH>/<LOCAL_FILE> <REMOTE_FILE>

sftp> put /var/core/vpxd.gz vpxd-test.gz
Uploading /var/core/vpxd.gz to /srv/ftp/VMware/vCenter/sn_vc70b.vmware.local/M_7.0.2.00200_20210616-104539_/vpxd-test.gz
/var/core/vpxd.gz

To remove a file

> rm <REMOTE_FILE>

sftp> rm rbd.gz
Removing /srv/ftp/VMware/vCenter/sn_vc70b.vmware.local/S_7.0.2.00200_20210622-235914_/rbd.gz

To remove a directory

> rmdir <REMOTE_DIRECTORY_NAME>

sftp> rmdir S_7.0.2.00200_20210618-235911_
sftp>

Note: Before deleting the directory, make sure the directory is empty.

To quit the sftp utility

sftp> !
root@vc70b [ ~ ]#

In the Series:

Leave a Reply

Your email address will not be published. Required fields are marked *