Backup BFI Directory

I am trying to copy the BFI directory as a backup prior to doing an upgrade to Bigfix Inventory, and I am running into path too long.

The directory name D:\Bigfix Enterprise\bfi\wlp\usr\servers\server1\workarea\org.eclipse.osgi\57\data\cacheOverlay\com.ibm.ws.app.manager_156\WEB-INF\lib.cache\jruby-stdlib.jar\META-INF\jruby.home\lib\ruby\stdlib\org\bouncycastle\bcpkix-jdk15on\1.62.cache\bcpkix-jdk15on-1.62.jar is too long.
The directory name D:\Bigfix Enterprise\bfi\wlp\usr\servers\server1\workarea\org.eclipse.osgi\57\data\cacheOverlay\com.ibm.ws.app.manager_156\WEB-INF\lib.cache\jruby-stdlib.jar\META-INF\jruby.home\lib\ruby\stdlib\org\bouncycastle\bcprov-jdk15on\1.62.cache\bcprov-jdk15on-1.62.jar is too long.
The directory name D:\Bigfix Enterprise\bfi\wlp\usr\servers\server1\workarea\org.eclipse.osgi\57\data\cacheOverlay\com.ibm.ws.app.manager_156\WEB-INF\lib.cache\jruby-stdlib.jar\META-INF\jruby.home\lib\ruby\stdlib\org\bouncycastle\bctls-jdk15on\1.62.cache\bctls-jdk15on-1.62.jar is too long.

Windows Server Backup might work for this requirement, rather than a file-based copy.

Agreed. Robocopy may have better results than copy, or possibly zipping up the directory. If neither of those work, I have a couple of other tricks with UNC paths you could try as well.

I am concerned about the validity of those directories. BFI wouldn’t design a directory structure that is so long, would they?

No, it all just depends on how the paths are referenced. The “copy” command by default is limited to the older Win32 path limits, but if you’re accessing the filesystem in a POSIX way like Java or Robocopy the limits are much longer.

In fact, you can make plain-old ‘copy’ or many other command-line utilities work with the longer POSIX paths by doing something like

copy "\\?\D:\Bigfix Enterprise\bfi" "\\?\D:\BackupBigFix\bfi"

( I don’t know what command you’re running for the copy though, and as far as I know ‘copy’ itself doesn’t have a directory recursion option. ‘xcopy’ has directory recursion, but doesn’t accept the POSIX paths…so, your mileage may vary… )

BFI uses mv command to create a backup/restore during upgrades. This command can be found in trace.log file. Here is an example:
Executing command [cmd.exe] [/c] [move] [/Y] [C:\PROGRA~1\BIGFIX~1\BFI\wlp] [C:\PROGRA~1\BIGFIX~1\BFI\wlp_10.0.9.0]

The following registry can be set to handle the long file path issue in Windows:
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
Edit LongPathsEnabled and set it to 1

1 Like