Google Team drive - 403 error

First off, thank you for Duplicati, its amazing!

I have multiple duplicati instances, and within the last week 3 of them have gone 403 on their google team drive backups. I will post the error at the end, its the same on all 3. I have verified permissions and monitored network connectivity during the backups and its fine. The only fix I have found is to delete and recreate the database, then the backups work consistenly again.

I’ve searched and not found anything in the forums that actually fixes the issue without the recreate.

Can anyone please help?

Below:

Failed: The remote server returned an error: (403) Forbidden.
Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.
at Duplicati.Library.Main.BackendManager.Delete(String remotename, Int64 size, Boolean synchronous)
at Duplicati.Library.Main.Operation.CompactHandler.d__9.MoveNext()
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction, BackendManager sharedBackend)
at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBackend, Boolean forceCompact, BackendManager sharedManager)
at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize)
at Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)
at Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.b__0(BackupResults result)
at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)

Log data:
2022-10-26 05:07:09 -06 - [Warning-Duplicati.Library.Main.BackendManager-DeleteFileFailure]: Failed to recover from error deleting file duplicati-be6b859c8dd45416a8af093be6c91e1fe.dblock.zip.aes
System.NullReferenceException: Object reference not set to an instance of an object.
at Duplicati.Library.Main.BackendManager.ThreadRun()
2022-10-26 05:07:10 -06 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
System.Net.WebException: The remote server returned an error: (403) Forbidden.
at Duplicati.Library.Main.BackendManager.Delete(String remotename, Int64 size, Boolean synchronous)
at Duplicati.Library.Main.Operation.CompactHandler.d__9.MoveNext()
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction, BackendManager sharedBackend)
at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBackend, Boolean forceCompact, BackendManager sharedManager)
at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize)
at Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()

and this morning I have the error on another 3 servers. Please help!

Welcome to the forum @genitguy3

Odd behavior from storage destinations is often not readily explained, and Team Drive seems rare.
I suppose you could try careful lower level testing using Duplicati.CommandLine.BackendTool.exe.
Duplicati.CommandLine.BackendTester.exe can do automated tests, starting with an empty folder.
They both use a Target URL which you can get from Export As Command-line. Your posts show a
delete operation failing, but I’m not sure if others fail. Recreate would be running lots of get ones.

Using those two command line tools, you can either pick the operations or have Duplicati run them.

Any idea what changed?

EDIT:

Google does have some odd permission rules where Duplicati can usually only see files that it made.
Was troubled duplicati-be6b859c8dd45416a8af093be6c91e1fe.dblock.zip.aes finally deleted?
If not, I suppose you could look at it to see who created it. Be careful if moving files in by hand though.
If you had done that, though, I’d have expected a delete error on a dlist unless you keep all versions.

I managed to find the solution for this. We had to increase the permissions to manager for the given user on that folder structure in good drive. No idea why it worked for some backups and not others.

1 Like