Symptoms
File level restore job failling on certain directory path with deep recursion. The FLR logs shows generic error logs
--------------------------------------------------------------------------------------------------------
----- START avvmwfile log UTC [18.2.100-134 Linux-x86_64]
--------------------------------------------------------------------------------------------------------
avvmwfile Info : Logging to /usr/local/avamarclient/var/MOD-1565970042058--3019-vmwfilew.log
avvmwfile Info : - Reading /usr/local/avamarclient/var/avvmwfile.cmd
avvmwfile Info : - Reading /usr/local/avamarclient/var/avvmwfileAll.cmd
avvmwfile Info : CTL listening on port 34258
avvmwfile Info : Setting ctl message version to 3 (from 1)
avvmwfile Info : Setting ctl max message size to 268435456
avvmwfile Info : - Reading /usr/local/avamarclient/var/avvmwfile.cmd
avvmwfile Info : - Reading /usr/local/avamarclient/var/avvmwfileAll.cmd
avvmwfile Info : targetlist contains
avvmwfile Error : Failed to restore files via network, check proxy log for details
avvmwfile Error : assist_restore error. ret: 157
--------------------------------------------------------------------------------------------------------
----- END avvmwfile log UTC (0 warnings, 2 errors, 0 fatal errors)
--------------------------------------------------------------------------------------------------------
Cause
Inside the virtual machine, Microsoft windows is configured with DFS (Distributed File System) with very deep file tree structures. When restoring to original location restore option we see on the proxy the FLR script log (/usr/local/avamarclient/bin/logs/flr*.err) the following:
>file name: file1.txt
>file name: files2
>file name: -example.txt
>fail to create file C:\DFS_Shares\users\restore\folder1\folder2\folder3\....-example.txt error code:2
Issue: Maximum Path Length Limitation (MAX_PATH) was exceeded. By default this limit is 260 which cause restore file creation issue if combination of save location and filename path is greater than 260 characters More information is available on this Microsoft page: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file"In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters.A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character"
Resolution
1. In newer Windows operating systems (Windows 10, Version 1607, and Later) enable Enable Long Paths. The Following microsoft kb has instructions: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-fileOR2. Instead of restoring to original location, perform a redirected restore into shorten directory path. Example: c:\restore\ which will reduce overall file path.