Google Drive backup fails with (Invalid status code: 308)

Hi,

I have a daily backup running on my Unraid server. It uploads to my google drive. This has been working fine for a few months, but on Tuesday, it constantly fails with:

One or more errors occurred. (One or more errors occurred. (Invalid status code: 308)

It fails with both Auto and Manual backups. The failure occurs about halfway through the backup.

Steps I’ve already tried:

  • Test connection is working.
  • Tried a new AuthID
  • Rebooted the server and duplicati container

Google is not bringing up any helpful results. 308 indicates a HTTP redirect? but the test connection works, and the upload does work for the first few files.

Can anyone offer any guidance?

Settings:

    "Settings": [
      {
        "Filter": "",
        "Name": "encryption-module",
        "Value": "aes",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "compression-module",
        "Value": "zip",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "dblock-size",
        "Value": "1GB",
        "Argument": null
      },
      {
        "Filter": "",
        "Name": "keep-versions",
        "Value": "5",
        "Argument": null
      }

Here is the full error log:


Jul 21, 2023 9:18 AM: Failed while executing "Backup" with id: 1
System.AggregateException: One or more errors occurred. (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308)) (One or more errors occurred. (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308)))) ---> System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308)) (One or more errors occurred. (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308))) ---> System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) ---> System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x005ba] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x007d7] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d5] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x000f2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x01048] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
   --- End of inner exception stack trace ---
  at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x0005d] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00009] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Controller+<>c__DisplayClass14_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x0004b] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x0026f] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, Duplicati.Library.Utility.IFilter filter) [0x00074] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x00349] in <30a34d71126b48248d040dda634ddad9>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308)) (One or more errors occurred. (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308))) ---> System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) ---> System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x005ba] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x007d7] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d5] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x000f2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x01048] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) ---> System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x005ba] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x007d7] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d5] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x000f2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
---> (Inner Exception #0) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---

---> (Inner Exception #1) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---

---> (Inner Exception #2) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---
<---

---> (Inner Exception #1) System.AggregateException: One or more errors occurred. (One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308)) ---> System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) ---> System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x005ba] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x007d7] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d5] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x000f2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. (Invalid status code: 308) (Invalid status code: 308) (Invalid status code: 308) ---> System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x005ba] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.Backup.BackendUploader.<Run>b__13_0 (<>f__AnonymousType12`1[<Input>j__TPar] self) [0x007d7] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at CoCoL.AutomationExtensions.RunTask[T] (T channels, System.Func`2[T,TResult] method, System.Boolean catchRetiredExceptions) [0x000d5] in <9a758ff4db6c48d6b3d4d0e5c2adf6d1>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.FlushBackend (Duplicati.Library.Main.BackupResults result, CoCoL.IWriteChannel`1[T] uploadtarget, System.Threading.Tasks.Task uploader) [0x000f2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter, System.Threading.CancellationToken token) [0x00cb2] in <9cab5b8f1b4f49ec980acae8e278968b>:0 
---> (Inner Exception #0) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---

---> (Inner Exception #1) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---

---> (Inner Exception #2) System.Net.ProtocolViolationException: Invalid status code: 308
  at System.Net.HttpWebRequest.Redirect (System.Net.HttpStatusCode code, System.Net.WebResponse response) [0x000e2] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.HttpWebResponse response) [0x0016f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x0006f] in <a8a996a78a804d888710c9e2575d78c8>:0 
  at System.Net.HttpWebRequest.MyGetResponseAsync (System.Threading.CancellationToken cancellationToken) [0x002fd] in <a8a996a78a804d888710c9e2575d78c8>:0 <---
<---
<---
<---

Welcome to the forum @UnraidBackuper

GDrive - Backup failed, Invalid status code: 308 was a previous case suggesting it’s a mono bug although Google’s possibly unusual use of the 308 as Resume Incomplete is arguably part of it.

WebException.Response is null under Mono, not null under .net (archived in Wayback Machine)

What’s the deal with HTTP status code 308?

Duplicati code which would handle 308 better (I hope) is shown there, but mono’s reject might be:

Possibly one of the Duplicati devs will have some thoughts on whether or not this can be helped.

If not, I guess check your network connections, maybe restart things, maybe reduce volume size.
1 GB is quite a bit over the 50 MB default. If you suffer a temporary network issue, reducing size
possibly will allow upload to finish (at current, watch About → Show log → Live → Retry to see if
retries are happening currently), and if you can raise it later, compact should repackage to larger.

Thanks, appreciate the reply. I dropped the dblock-size down to 500mb and it seems to be working now.

1 Like