VCF Component Backup Fails: 'Invalid Path' Error Caused by Windows MAX_PATH Limitation
search cancel

VCF Component Backup Fails: 'Invalid Path' Error Caused by Windows MAX_PATH Limitation

book

Article ID: 454601

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • VCF component backups (such as etcd snapshots) fail during the upload phase when the destination is a Windows-based SFTP server.
  • Scheduled or manual VCF Component backup tasks fail when uploading the snapshot to the remote target.
  • The target SFTP server is Windows-based (e.g., CompleteFTP) backed by a network file share.
  • The vmsp-platform pod logs indicate a failure during the SFTP transfer stage :

    k logs -n vmsp-platform scheduled-etcd-backup-##########-upload-snapshot-##########

    ERROR : etcd-snapshot-YY-MM-DDT##-##-###.db.zst.enc: Failed to copy: Update Create failed: sftp: "invalid path" (unknown)
    ERROR : Attempt 1/3 failed with 1 errors and: Update Create failed: sftp: "invalid path" (unknown)
    ERROR : etcd-snapshot-YY-MM-DDT##-##-###.db.zst.enc: Failed to copy: Update Create failed: sftp: "invalid path" (unknown)
    ERROR : Attempt 2/3 failed with 1 errors and: Update Create failed: sftp: "invalid path" (unknown)
    ERROR : etcd-snapshot-YY-MM-DDT##-##-###.db. zst.enc: Failed to copy: Update Create failed: sftp: "invalid path" (unknown)
    ERROR : Attempt 3/3 failed with 1 errors and: Update Create failed: sftp: "invalid path" (unknown)
    Failed to copy: Update Create failed: sftp: "invalid path" (unknown)
    time="<date-time>" level=info msg="sub-process exited" argo=true error="<nil>"

Environment

VCF Operations 9.1

Cause

Windows systems enforce a default maximum file system path limit (MAX_PATH) of 260 characters.
Maximum Path Length Limitation 
When VCF component backups are directed to a Windows-hosted SFTP server, the total combined remote file path—including the SFTP home directory, the base directory, and the dynamically generated VMSP subpath—frequently exceeds this limit.
This causes the underlying Windows API calls on the SFTP host to reject path creation, resulting in the "invalid path" error.

Resolution

Since VMSP does not perform pre-validation or path truncation before attempting the SFTP upload, the target path length must be shortened manually or host-level long path handling must be enabled.

  • Shorten the Configured SFTP Directory Structure
    Configure the SFTP user's root/home directory on the SFTP server to point to a shallow local folder to minimize the total path length.

Example: Change a deeply nested path like "C:\Shares\Department\Backups\VCF\Data" to a shallow path such as "C:\backups".
Update the Backup Location in VCF Operations to reflect this change.

  • Enable Long Paths on the Windows SFTP Host
    If the directory structure cannot be shortened, you may enable Windows Long Path support to remove the 260-character restriction for API calls supported by your SFTP server software.
    Please consult your SFTP software team for assistance with this configuration

Additional Information

How to enable long filenames in CompleteFTP