FBBR – Troubleshooting – SFTP
November 28, 2023FBBR – Troubleshooting – SFTP Retention
November 30, 2023FBBR – 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:
- File-Based Backup and Restore – vCenter
- FBBR – Troubleshooting – Using Self Backup
- FBBR – Troubleshooting – FTP Backup
- FBBR – Troubleshooting – FTP Retention
- FBBR – Troubleshooting – FTPS Backup
- FBBR – Troubleshooting – FTPS Retention
- FBBR – Troubleshooting – HTTP
- FBBR – Troubleshooting – HTTPS Backup
- FBBR – Troubleshooting – HTTPS Retention
- FBBR – Troubleshooting – SCP
- FBBR – Troubleshooting – SFTP
- FBBR – Troubleshooting – SFTP Backup
- FBBR – Troubleshooting – SFTP Retention
- FBBR – Troubleshooting – NFS Backup
- FBBR – Troubleshooting – SMB Backup
- FBBR – Troubleshooting – SMB – 6.x/Upto 7.0U3e
- FBBR – Troubleshooting – SMB – From 7.0U3f/8.x
- File-Based Backup and Restore – Strict Certificate Validation
- File-Based Backup and Restore – Steps to Restore
- File-Based Backup and Restore – VCHA