Failed: Invalid header marker

#1

Hello, I have a problem in one of my computers when doing the copy with duplicati v2.0.2.1, it happens to me every 2 months, I create the task again and it works again for another little time. Would anyone know how to tell me what could happen to me?

Thank you very much

Failed: Invalid header marker
Details: System.Security.Cryptography.CryptographicException: Invalid header marker ---> System.IO.InvalidDataException: Invalid header marker
   en SharpAESCrypt.SharpAESCrypt.ReadEncryptionHeader(String password, Boolean skipFileSizeCheck)
   en SharpAESCrypt.SharpAESCrypt..ctor(String password, Stream stream, OperationMode mode, Boolean skipFileSizeCheck)
   en Duplicati.Library.Encryption.AESEncryption.Decrypt(Stream input)
   en Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
   en Duplicati.Library.Main.BackendManager.<>c__DisplayClass34_0.<coreDoGetPiping>b__0()
   en System.Threading.Tasks.Task.Execute()
   --- Fin del seguimiento de la pila de la excepción interna ---
   en Duplicati.Library.Main.AsyncDownloader.AsyncDownloaderEnumerator.AsyncDownloadedFile.get_TempFile()
   en Duplicati.Library.Main.Operation.RecreateDatabaseHandler.DoRun(LocalDatabase dbparent, Boolean updating, IFilter filter, NumberedFilterFilelistDelegate filelistfilter, BlockVolumePostProcessor blockprocessor)
   en Duplicati.Library.Main.Operation.RecreateDatabaseHandler.Run(String path, IFilter filter, NumberedFilterFilelistDelegate filelistfilter, BlockVolumePostProcessor blockprocessor)
   en Duplicati.Library.Main.Operation.RepairHandler.RunRepairLocal(IFilter filter)
   en Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter)
   en Duplicati.Library.Main.Controller.<>c__DisplayClass20_0.<Repair>b__0(RepairResults result)
   en Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
#2

Welcome to the forum! I edited your post to improve the formating. (Just added ~~~ before and after the output you pasted, please see here for details).

#3

Hello @luistalavera, sorry to hear you’re having this issue. I have a few questions to hopefully help narrow down the potential causes - feel free to answer as many or few as want / can (but the more answers we get the more likely we can figure out what’s going on):

  1. When you recreate the backup job is it just the local job you recreate or are you deleting the backup and starting over from “nothing”?
  2. When you recreate the backup job is it all by hand or are you exporting the existing job as a file then importing it again?
  3. What OS are you running on?
  4. What destination are you going to?
  5. Are you using any non-default settings in your backup (sped throttles, volume size, block size, encryption type, etc.)
#4

I tried to repair and then repair and delete the database, but it did not work. I always have to do the job from the beginning. I use w2008 R2, the destination is Google drive. an AES256 encryption, the volume of the copy is 65Gb and the block size is 50Mb

#5

What was the error message shown hen it didn’t work?

#6

I ran into the same issue today and have no clue why and how I can fix it.

This is from the duplicati.log

2019-03-25 16:11:54 +01 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
System.Security.Cryptography.CryptographicException: Invalid header marker ---> System.IO.InvalidDataException: Invalid header marker
  at SharpAESCrypt.SharpAESCrypt.ReadEncryptionHeader (System.String password, System.Boolean skipFileSizeCheck) [0x00054] in <5e494c161b2e4b968957d9a34bd81877>:0
  at SharpAESCrypt.SharpAESCrypt..ctor (System.String password, System.IO.Stream stream, SharpAESCrypt.OperationMode mode, System.Boolean skipFileSizeCheck) [0x001af] in <5e494c161b2e4b968957d9a34bd81877>:0
  at (wrapper remoting-invoke-with-check) SharpAESCrypt.SharpAESCrypt..ctor(string,System.IO.Stream,SharpAESCrypt.OperationMode,bool)
  at Duplicati.Library.Encryption.AESEncryption.Decrypt (System.IO.Stream input) [0x00000] in <f3dfd7d9192a41f6af77ad64669f738a>:0
  at Duplicati.Library.Encryption.EncryptionBase.Decrypt (System.IO.Stream input, System.IO.Stream output) [0x00000] in <f3dfd7d9192a41f6af77ad64669f738a>:0
  at Duplicati.Library.Main.BackendManager+<>c__DisplayClass36_0.<coreDoGetPiping>b__0 () [0x00029] in <fbbeda0cad134e648d781c1357bdba9c>:0
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <7686e0988c5144ca8abb303461e0b835>:0
  at System.Threading.Tasks.Task.Execute () [0x00000] in <7686e0988c5144ca8abb303461e0b835>:0
   --- End of inner exception stack trace ---

Any ideas, I am using Duplicati - 2.0.4.15_canary_2019-02-06 and haven’t made any software changes so far.

The second backup job I have is working just fine, it only copys to backblaze instead of using SCP to a remote host.

Thank for any tips.

#7

I made the 100mb files

Descarga Outlook para iOS

#8

had the same issue again.
restarting duplicati fixed it in my case

#10

I migrated to canary docker container for my installation because I did not trust the qnap mono implementation.

But still the same :frowning: My 1,7TB backup is throwing the same error over and over again, and sometimes a restart of the container fixes is, sometimes not.
Fun fact, the second job with 25GB is always running through without an error.

Both have the same destination, use the same protocol to transfer (SSH) and other setting are similar only the size differs.

This is starting to bug me
Running Duplicati - 2.0.4.17_canary_2019-04-11

System.Security.Cryptography.CryptographicException: Invalid header marker ---> System.IO.InvalidDataException: Invalid header marker at SharpAESCrypt.SharpAESCrypt.ReadEncryptionHeader (System.String password, System.Boolean skipFileSizeCheck) [0x00054] in <5e494c161b2e4b968957d9a34bd81877>:0 at SharpAESCrypt.SharpAESCrypt..ctor (System.String password, System.IO.Stream stream, SharpAESCrypt.OperationMode mode, System.Boolean skipFileSizeCheck) [0x001af] in <5e494c161b2e4b968957d9a34bd81877>:0 at (wrapper remoting-invoke-with-check) SharpAESCrypt.SharpAESCrypt..ctor(string,System.IO.Stream,SharpAESCrypt.OperationMode,bool) at Duplicati.Library.Encryption.AESEncryption.Decrypt (System.IO.Stream input) [0x00000] in <8a774389440c4ca192f23b405ad0f041>:0 at Duplicati.Library.Encryption.EncryptionBase.Decrypt (System.IO.Stream input, System.IO.Stream output) [0x00000] in <8a774389440c4ca192f23b405ad0f041>:0 at Duplicati.Library.Main.BackendManager+<>c__DisplayClass36_0.<coreDoGetPiping>b__0 () [0x00029] in <e737745a39a143f09a82fd4f2eaa262c>:0 at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <3833a6edf2074b959d3dab898627f0ac>:0 at System.Threading.Tasks.Task.Execute () [0x00000] in <3833a6edf2074b959d3dab898627f0ac>:0 --- End of inner exception stack trace --- at Duplicati.Library.Main.AsyncDownloader+AsyncDownloaderEnumerator+AsyncDownloadedFile.get_TempFile () [0x00008] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Operation.CompactHandler.DoCompact (Duplicati.Library.Main.Database.LocalDeleteDatabase db, System.Boolean hasVerifiedBackend, System.Data.IDbTransaction& transaction, Duplicati.Library.Main.BackendManager sharedBackend) [0x0026c] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Operation.DeleteHandler.DoRun (Duplicati.Library.Main.Database.LocalDeleteDatabase db, System.Data.IDbTransaction& transaction, System.Boolean hasVerifiedBacked, System.Boolean forceCompact, Duplicati.Library.Main.BackendManager sharedManager) [0x00399] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired (Duplicati.Library.Main.BackendManager backend, System.Int64 lastVolumeSize) [0x000a5] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x01028] in <e737745a39a143f09a82fd4f2eaa262c>:0 at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0 at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x00271] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, Duplicati.Library.Utility.IFilter filter) [0x00068] in <e737745a39a143f09a82fd4f2eaa262c>:0 at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x002f7] in <c71fcbcde8624d2e8a8aa9e50b627014>:0 
#11

I did some testing the last days, and as soon as I set the backup retention to “keep all backups” the error is gone. Before that I had “smart backup retention”

What does this mean, is my backup now broken, because for me it seems like Duplicati is unable to open older backup files to “delete” them based on the former retention setting.