I'm using gsutil on Windows. Sometimes, when copying files from my PC to the Google Cloud Storage bucket I will get messages such as:
- "CommandException: Some temporary components were not uploaded successfully. Please retry this upload"
- "CommandException: n files/objects could not be transferred."
I'm working with the -L parameter but, currently, I cannot effectively trap the mentioned errors - I know this is possible using -c and -L on Linux environments. Instead, I loop thru the gsutil cp -L command about 10 times which, in practice, does the trick and ends up copying all the files.
Is there a better way to handle this command exceptions so I can trap if gsutil fails and retry the operation till it finally copies all the files to the destination bucket? Some kind of errorlevel feature?