(invalid passphrase?): Message has been altered, do not trust content

or instead of --log-file-log-level (which can make a large log), narrow with –log-file-log-filter=*RetryGet

Example output from an intentionally corrupted file where I changed a character near the middle of file:

2020-01-26 09:24:10 -05 - [Retry-Duplicati.Library.Main.BackendManager-RetryGet]: Operation Get with file duplicati-b0379abeb61784c0eaeaf23000670e78c.dblock.zip.aes attempt 1 of 5 failed with message: Failed to decrypt data (invalid passphrase?): Message has been altered, do not trust content
System.Security.Cryptography.CryptographicException: Failed to decrypt data (invalid passphrase?): Message has been altered, do not trust content ---> SharpAESCrypt.SharpAESCrypt+HashMismatchException: Message has been altered, do not trust content
   at SharpAESCrypt.SharpAESCrypt.Read(Byte[] buffer, Int32 offset, Int32 count)
   at Duplicati.Library.Utility.Utility.CopyStream(Stream source, Stream target, Boolean tryRewindSource, Byte[] buf)
   at Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
   --- End of inner exception stack trace ---
   at Duplicati.Library.Main.BackendManager.coreDoGetPiping(FileEntryItem item, IEncryption useDecrypter, Int64& retDownloadSize, String& retHashcode)
   at Duplicati.Library.Main.BackendManager.DoGet(FileEntryItem item)
   at Duplicati.Library.Main.BackendManager.ThreadRun()

Example output from intentionally corrupting the first character of the file:

2020-01-26 15:44:41 -05 - [Error-Duplicati.Library.Main.Operation.TestHandler-RemoteFileProcessingFailed]: Failed to process file duplicati-b0379abeb61784c0eaeaf23000670e78c.dblock.zip.aes
System.Security.Cryptography.CryptographicException: Invalid header marker ---> System.IO.InvalidDataException: Invalid header marker
   at SharpAESCrypt.SharpAESCrypt.ReadEncryptionHeader(String password, Boolean skipFileSizeCheck)
   at SharpAESCrypt.SharpAESCrypt..ctor(String password, Stream stream, OperationMode mode, Boolean skipFileSizeCheck)
   at Duplicati.Library.Encryption.AESEncryption.Decrypt(Stream input)
   at Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
   at Duplicati.Library.Main.BackendManager.<>c__DisplayClass36_0.<coreDoGetPiping>b__0()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at Duplicati.Library.Main.AsyncDownloader.AsyncDownloaderEnumerator.AsyncDownloadedFile.get_TempFile()
   at Duplicati.Library.Main.Operation.TestHandler.DoRun(Int64 samples, LocalTestDatabase db, BackendManager backend)

but if you get the file name, what are you going to do with it? If you have a truly broken file, it’s lost.

Failed: Invalid header marker has lots of relevant information. One thing I wonder about is the idea:

Was this ever done, and was throttling either off or Duplicati at least 2.0.4.22_canary_2019-06-30?

I know you were on 2.0.4.37_canary_2019-12-12, otherwise I’d say you require at least 2.0.4.24 to avoid the temporary throttling corruption. The permanent corruption fix was in 2.0.4.22, so I wonder whether you have an old damaged backup and are slowly falling over all of the problems with that?

Did you try the suggestion to increase --backup-test-samples or --backup-test-percentage options? Finding a large number of broken files (maybe you’re noting names as you get them?) is bad news.

What sort of restore tests (if any) are you doing? Limping along with a broken backup is a bad idea.