Comments (6)
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.
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.
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.
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.
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 :-):
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.
Committed to beta branch for testing.
from dupreport.
Related Issues (20)
- Fix Typos in convert.py file HOT 1
- Add OS Name & Version to Log File HOT 1
- dupReport.py installer changes folder name HOT 2
- Error crash when target destination is unavailable HOT 1
- smtplib.SMTPDataError: (501, b'Syntax error - line too long') HOT 18
- Typo in [report] section HOT 1
- Change description of -verbose command line option HOT 1
- Program crashes when can't connect to SMTP server HOT 1
- Fix Typos in docs/WhatIsDupreport.md HOT 1
- Indicate Warning or Error in subject line of the mail report HOT 16
- Only send on failure HOT 1
- Parsing failures HOT 4
- Enabling "Less secure apps" is required for Gmail access HOT 2
- "Nonetype has no attribute groups" - dupreport crash HOT 7
- Add an Ignore option to the Source-Destination Section of the .RC file HOT 1
- Need more flexibility in defining Subject Line and S-D regex in .rc file (Was: RegEx suddenly does not match anymore) HOT 16
- dupReport is ignoring Backup Warning Threshold HOT 1
- Typo in the docs for the-b option HOT 1
- Syslog output crashes ELK Logstash 8.1.2 HOT 1
- Ignored S/D Pairs still show up in LastSeen Report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dupreport.