Reputation: 11
I have a large project that I need to backup using GSutil. I keep getting "Error 3" with files nearing the windows file path limit. Is there anyway to get this working?
I Tried recreating the issue by syncing a diffrent local file with a long path to a diffrent folder. The same error occured.
(console output) https://i.sstatic.net/fEGc5.png
I am running Windows 10. The command i ran is : gsutil -m rsync -r -d -n Test Target
This is the path which failed:
C:\Users\temp\Desktop\Test\TestPath\LongTestTestTestTestTest Test - LongTestTestTestTestTest Test - LongTestTestTestTestTest Test - LongTestTestTestTestTest Test -\LongTestTestTestTestTest Test\LongTestTestTestTes\SO MUCH LONGER PATH 2\A BIT LONGER AGAIN\LONG FILE NAME,2_1225688.txt
(windows path) https://i.sstatic.net/uVRue.png
The issue I have is Windows allows these files to exist but gsutil is unable to sync them. If I shorten the path by a few characters the issue goes away. The Issue occurs during the listing phase It occurs both in the soruce and the target folder.
Upvotes: 1
Views: 860
Reputation: 119
I found a useful discussion on Serverfault.com and this simple solution worked on my Windows Server 2016:
Replace
gsutil -m rsync -r C:\ gs://...
by
gsutil -m rsync -r \\?\C:\ gs://...
Upvotes: 1