← cyphonix.comSign in to the console
Cyphonix Backup

Home › Knowledge base › Long paths on Windows

Long paths on Windows

Article
KB-1090
Category
Backup
Applies to
Windows; agent 4.4 and later

Symptoms

Jobs complete with warnings listing CBK-3010. The skipped files are in deeply nested folders, often on file servers under project or archive shares.

Background

Older Windows programming interfaces limit a full path to 260 characters. Users reach files through a share or mapped drive, where the path they see is shorter than the path on the server's disk, so files can be created that exceed the limit from the server's point of view.

Agent behaviour by version

AgentLong paths
Before 4.4.0Not supported. Always skipped.
4.4.0 to 4.5.1Supported, off by default. Enable with sources.long_paths.
4.6.0 and laterOn by default.

Resolution

Update to 4.6.0 or later, or on 4.4 and 4.5:

cbk config set sources.long_paths true

In a policy: Policies › select policy › Sources › Back up long paths.

The next backup picks up the previously skipped files.

Restoring long paths

Files with long paths can be restored to the original location on the server. Opening them afterwards has the same limits as before: users reach them through the share.

Restoring them somewhere that makes the path longer still, for example into D:\Restore\ plus the full original path, can exceed even the extended limit for the application that needs to open them. Restore to a short destination such as D:\R\, or restore a subfolder instead of the whole tree.

Finding long paths before they are a problem

In PowerShell on the server:

Get-ChildItem -LiteralPath '\\?\D:\Shares' -Recurse -ErrorAction SilentlyContinue |
  Where-Object { $_.FullName.Length -gt 250 } | Select-Object -First 100 FullName

Last reviewed: · Report a problem with this page