Giter Site home page Giter Site logo

Comments (6)

dcurrey avatar dcurrey commented on May 25, 2024

After thinking about this some more I think subjectregex should be something like

subjectregex = ^Duplicati Backup \((Success|Error|Warn)\) report for

Assuming duplicati creates the proper output with Error and Warn dR will process the ParsedResult: in the email correctly. Not sure how to force Duplicati to create a warning/error message now that I need one.

Something separate to handle the Fatal error that %PARSEDRESULT% = Fatal is all that is needed

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on May 25, 2024

Great work-around. Part of the 'philosophy' of dR was to try to work with as much of Duplicati's defaults as possible, including handling abnormal emails coming in. I thought I had done this, but apparently not well enough. The subjectregex param was added for 'tinkerers' but Duplicati is hard enough to configure without laying this on a newbie. I'd like to try to trace the original problem and build its handling into the code. Can you send/post a 'failed' email sample ( as many different types as you have) so I can see what dR is trying to parse and hopefully come up with a clean handler for it?

from dupreport.

dcurrey avatar dcurrey commented on May 25, 2024

No problem here is the error generated from my second forced abort.

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from localhost (localhost.localdomain [127.0.0.1])
	by beta.domain.com (Postfix) with ESMTP id 887AB45429D1
	for <[email protected]>; Tue, 24 Oct 2017 15:47:15 -0400 (EDT)
X-Virus-Scanned: Debian amavisd-new at beta.domain.com
Received: from beta.domain.com ([127.0.0.1])
	by localhost (beta.domain.com [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id WxfKZyOC7gxU for <[email protected]>;
	Tue, 24 Oct 2017 15:47:14 -0400 (EDT)
Received: from [192.168.1.11] (dsl-1-86-85-12.some.net [1.86.85.12])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: [email protected])
	by beta.domain.com (Postfix) with ESMTPSA id 778A24542650
	for <[email protected]>; Tue, 24 Oct 2017 15:47:14 -0400 (EDT)
From: Duplicati <[email protected]>
Date: Tue, 24 Oct 2017 15:47:13 -0400
Subject: Duplicati Backup (Fatal) report for test@ddc3
Message-Id: <6INB1DQRO2U4.7SU3SZ24TUJ83@DDC3>
To: DupReport <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Failed: Object reference not set to an instance of an object
Details: System.NullReferenceException: Object reference not set to an instance of an object
  at Duplicati.Library.Main.Volumes.VolumeWriterBase.get_Filesize () [0x00000] in <82db7c3af7d944569906ea5ff7f18985>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.RecreateMissingIndexFiles (Duplicati.Library.Main.BackendManager backend) [0x001c9] in <82db7c3af7d944569906ea5ff7f18985>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00553] in <82db7c3af7d944569906ea5ff7f18985>:0 

Looking back I found my first one it is slightly different.
I left out most of the message headers

From: Duplicati <[email protected]>
Date: Tue, 24 Oct 2017 15:47:13 -0400
Subject: Duplicati Backup (Fatal) report for test@ddc3
Message-Id: <6INB1DQRO2U4.7SU3SZ24TUJ83@DDC3>
To: DupReport <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Failed: Thread was being aborted.
Details: System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
   at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
   at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
   at Duplicati.Library.Utility.BlockingQueue`1.Enqueue(T item)
   at Duplicati.Library.Main.BackendManager.WaitForEmpty(LocalDatabase db, IDbTransaction transation)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)

from dupreport.

dcurrey avatar dcurrey commented on May 25, 2024

Here is another

Failed: The process cannot access the file because it is being used by another process.
Details: System.IO.IOException: The process cannot access the file because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
   at Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter)
   at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)

At a glance it looks like if dR parses that first failed line properly and drop the rest you might be ok without changing the subject.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on May 25, 2024

I have this on the run now. Thanks for the samples. New code will gracefully handle and report failed backup jobs without changing the Subject line specification (and without crashing :-):

image

It may be a couple of days before I can clean the code and upload to the beta branch. Also adding a couple of other fixes while I'm at it. Will notify when ready to test.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on May 25, 2024

Committed to beta branch for testing.

from dupreport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.