####-#### NSX 5266 - [nsx@6876 comp="nsx-manager" errorCode="MP29111" s2comp="backup-restore" subcomp="manager"] Cluster backup failed with Status [status=URI_NOT_FOUND, statusDetail={"module_name": "node-services", "error_message": "Specified uri '/Users/Administrator/nsxbackup/#####/cluster-node-backups/2.4.2.0.0.14269551-74af0842-####-####-####-adf3811321b5-192.168.#.10/backup-2019-12-14T10_59_07UTC/cluster_backup-74af0842-####-####-####-adf3811321b5-192.168.#.#-nsx-policy-manager.tar' not found.", "error_code": 36219}, startTime=1576321162704, endTime=1576321178560].
####-#### NSX 86061 - [nsx@6876 comp="nsx-manager" errorCode="MP29115" level="ERROR" s2comp="backup-restore" subcomp="manager"] Cluster backup failed with ; BackupAsyncStatus [BackupStatus [status=AUTH_FAILURE, statusDetail=Cannot connect to sftp server. The remote server returned error: status: 255 out: '[Errno 5] Input/output error'.
The issue occurs due to Windows servers maximum path length limit of 260 characters, the filename can only be 256 characters, as 4 are reserved for drive and NULL terminating character, see Maximum Path Length Limitation for more details.
Note: It has also been seen, when using Windows Openssh versions lower than the supported 8.1 version, there is also a 260 character limitation.
To identify the length of the path used by NSX, for a backup on the SFTP, review the log /var/log/nvpapi/api_server.log on the NSX manager which was VIP leader when the backup was attempted.
You will see a log line similar to:
PUT /image/backup/cluster/backup_<UUID>_nsx-manager.tar /home/backup/cluster-node-backups/<NSX-version-UUID-IP/FQDN>/backup-<date-time>/cluster_backup-<UUIDIP/FQDN>-nsx-ufo-backup-restore.tar
Ensure you use the supported versions of Windows and Openssh.
VMware NSX 4.2 Configure Backups
VMware NSX-T Datacenter 3.2 Configure Backups
Enable long paths in Windows server:
The Windows Maximum Path Length configuration change will only be effective if running Openssh 8.1 or higher, lower versions of Openssh will continue to be restricted to 260 characters even after the Windows Maximum Path Length configuration change.
Test SFTP backup server:
A method to test if the SFTP server connection is working, correct permissions are applied and no file path length restrictions apply, is to use the following steps.
touch tmp.txt
sftp <backup_user>@<sftp_server_ip>
mkdir <backup_dir_given_in_backup_config>
mkdir <backup_dir_given_in_backup_config>/cluster-node-backups
mkdir <backup_dir_given_in_backup_config>/cluster-node-backups/#.#.#.0.21061376-Dual-########-####-####-####-############-###.###.###.###-########-####-####-####-############
mkdir <backup_dir_given_in_backup_config>/cluster-node-backups/#.#.#.0.21061376-Dual-########-####-####-####-############-###.###.###.###-########-####-####-####-############/backup-####-##-##T##_##_##UTC
PUT tmp.txt <backup_dir_given_in_backup_config>/cluster-node-backups/#.#.#.0.21061376-Dual-########-####-####-####-############-###.###.###.###-########-####-####-####-############/backup-####-##-##T##_##_##UTC/cluster_backup-########-####-####-####-############-###.###.###.###-########-####-####-####-############-nsx-ufo-backup-restore.tar
Note: <backup_dir_given_in_backup_config> is the backup directory path specified in the NSX UI.
It is also expected to get a failure result, is the directory already exist, NSX ignores this error.
The details of the file path are not that important, the above example has the IP address, UUID and date/time hashed out, but can be used as is.
Note:
After an NSX upgrade to NSX 4.x, previous working backups, before the 4.x upgrade and using a Windows backup server, may fail.
In NSX 4.x versions, the backup file has more detail, which means the backup file which is stored on the backup server will be longer I.E. more characters.
This results in the file path now being longer.
Ensure the destination server supports the full length of the backup file, in the folder of the destination backup server..
For additional information see Troubleshooting NSX Backup and Restore Failures