VAMI SFTP backup always fails while creating backup directory on remote backup server
search cancel

VAMI SFTP backup always fails while creating backup directory on remote backup server

book

Article ID: 399004

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

SFTP backup always fails while creating backup directory on remote backup server.

You should see both of the below error log lines in /var/log/vmware/applmgmt/backup.log for all the failing backups:

"ERROR: sftp cmd failed. RC: 2, Err: curl: (2) Failure establishing ssh session: -43, Failed getting banner" 
"ERROR: Failed to create backup directory Plugin error occurred. ErrCode: 5, Args: ()""

Environment

VCF 9.1

Cause

We try to create an ssh tunnel for faster backup. If the tunnel creation fails, we fallback to backup with curl commands. If the backup server has some security configurations around the number of consecutive login failures, the VC might get locked and backup server will not accept any further requests. So the curl commands also fail causing the backup failure.

Resolution

Skipping the ssh tunnel creation for SFTP backups can resolve this issue.

Steps : 

1. Please take a backup of the appliance.conf file before making changes:

   cp /etc/applmgmt/appliance/appliance.conf /etc/applmgmt/appliance/appliance$(date '+%Y-%m-%d').conf.bak

2. Add "skipSshTunnel" configuration in the /etc/applmgmt/appliance/appliance.conf:

   echo "$(jq '.backupRestore.skipSshTunnel=true' /etc/applmgmt/appliance/appliance.conf )" > /etc/applmgmt/appliance/appliance.conf
   
3. Restart the applmgmt service :

   service-control --restart applmgmt

This is resolved in vCenter Server version 9.1.