Giter Site home page Giter Site logo

Comments (16)

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024 1

OK, I think I have it figured out. "Failure" is not an official Duplicati result code, it's just created internally by dupReport whenever anything unusual happens or it sees a non-standard email while it runs. I have accounted for that now by adding a new #FAILURE# keyword you can use in the command line. I also added 2 more keywords:

#ALL# - Equivalent to #SUCCESS##WARNING##ERROR##FAILURE#
#ANYERROR# - Equivalent to #WARNING##ERROR##FAILURE#

Try the new Issue_172 branch code and see if this works for you now.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024 1

Added to 3.0.6.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

Sounds like a great idea! Let me see ow best to incorporate it into the program.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

I made some changes to the code that I think will address this and uploaded it to the Issue_172 branch. The change allows you to put keywords in the title= specification in the [report] section of the .rc file. Explanation can be found in the docs for that branch under "Reporting->The [report] section->Title Keyword Substitution." Please download that code and try it out and let me know what you think. I'm still doing some testing here so let me know if this addresses your suggestion. Thanks for taking a look.

HG

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

@wechsler42 , never mind, it's not working right. Let me play with it some more and I'll let you know when it's working.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

@wechsler42 , I think I have it working now. Download the latest code from the Issue_172 branch and see if it works for you.

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
thanks for considering my feature suggestion.
I tried the Issue_172 branch for test runs with 1 Warning and 2 Errors on my GMX mail account. However, it did not work at all for me. Whatever I tried:
title = #ERROR# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR#
title = #ERROR##Warning# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR##Warning#
title = #ERROR##Warning#
Except of the last trial I always received "Duplicati Backup Summary Report" as subject line. For the last trial I even got an empty subject line. Perhaps you have a hint for me what I could try more?

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

Hmmmm, that's not good.

The first thing that comes to mind is that the keywords must be in all caps. So #ERROR# should have worked but #Warning# would not.

I added some debugging statements into the code (which I should have done earlier) and uploaded a new version to Issue_172. Please download and run this new code using the -v7 option for each of the following:

title = #ERROR##WARNING# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR##WARNING#

Then upload the resulting log files (all sensitive information will be masked in the log file). Also please post the [report] section from your .rc file so I can see if there may be a problem with the specification.

Thanks.

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
thanks for the guidance.

I run the trial for case:
title = #ERROR##WARNING# Duplicati Backup Summary Report
with this command: ./dupReport.py -i -v7
and this report section in my .rc file:
[report]
layout = srcdest, noactivity, lastseen
columns = source:Source, destination:Destination, date:Date, time:Time, duration:Duration, dupversion:Version, examinedFiles:Files, examinedFilesDelta:+/-, sizeOfExaminedFiles:Size, fileSizeDelta:+/-, addedFiles:Added, deletedFiles:Deleted, modifiedFiles:Modified, filesWithError:File Errors, parsedResult:Result, messages:Messages, warnings:Warnings, errors:Errors, logdata:Log Data
title = #ERROR##WARNING# Duplicati Backup Summary Report
titlebg = #FFFFFF
border = 1
padding = 5
sizedisplay = mb
repeatcolumntitles = true
suppresscolumntitles = false
durationzeroes = true
displaymessages = false
jobmessagebg = #FFFFFF
displaywarnings = true
jobwarningbg = #FFFF00
displayerrors = true
joberrorbg = #FF0000
displaylogdata = true
truncatemessage = 0
truncatewarning = 0
truncateerror = 0
truncatelogdata = 0
joblogdatabg = #FF0000
nobackupwarn = 0
nbwsubject = Backup Warning: #SOURCE##DELIMITER##DESTINATION# Backup Not Seen for #DAYS# Days
groupheadingbg = #D3D3D3
normaldays = 5
normalbg = #FFFFFF
warningdays = 20
warningbg = #FFFF00
errorbg = #FF0000
weminline = false
includeruntime = true
failedonly = False
showoffline = False

Unfortunately, there was no indication of Error or Warning in the subject line of the mail report. I hope the log file of this trial run helps to track down the issue.

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
I run the second trial for case:
title = Duplicati Backup Summary Report #ERROR##WARNING#
with this command: ./dupReport.py -i -v7
and this report section in my .rc file:
[report]
layout = srcdest, noactivity, lastseen
columns = source:Source, destination:Destination, date:Date, time:Time, duration:Duration, dupversion:Version, examinedFiles:Files, examinedFilesDelta:+/-, sizeOfExaminedFiles:Size, fileSizeDelta:+/-, addedFiles:Added, deletedFiles:Deleted, modifiedFiles:Modified, filesWithError:File Errors, parsedResult:Result, messages:Messages, warnings:Warnings, errors:Errors, logdata:Log Data
title = Duplicati Backup Summary Report #ERROR##WARNING#
titlebg = #FFFFFF
border = 1
padding = 5
sizedisplay = mb
repeatcolumntitles = true
suppresscolumntitles = false
durationzeroes = true
displaymessages = false
jobmessagebg = #FFFFFF
displaywarnings = true
jobwarningbg = #FFFF00
displayerrors = true
joberrorbg = #FF0000
displaylogdata = true
truncatemessage = 0
truncatewarning = 0
truncateerror = 0
truncatelogdata = 0
joblogdatabg = #FF0000
nobackupwarn = 0
nbwsubject = Backup Warning: #SOURCE##DELIMITER##DESTINATION# Backup Not Seen for #DAYS# Days
groupheadingbg = #D3D3D3
normaldays = 5
normalbg = #FFFFFF
warningdays = 20
warningbg = #FFFF00
errorbg = #FF0000
weminline = false
includeruntime = true
failedonly = False
showoffline = False

Unfortunately, there was again no indication of Error or Warning in the subject line of the mail report. I hope the log file of this second trial run helps to track down the issue.

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
I may have found a part of the solution to this issue.

If Duplicati Backup report for .... contains lines like:
"ParsedResult: Error"
"ParsedResult: Warning"
then it works fine :-)

If the Duplicati Backup report for ... only contains lines like this:
"Failed: Found 3 remote files that are not recorded in local storage, please run repair"
"2021-05-27 16:37:24 +02 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error"
then there is again no indication of Error or Warning in the subject line of the dupReport mail report.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

Ah, I was just reviewing the code and getting to the same conclusion when you beat me to it :-)

I'll think of a clean way to address the issue and post new code, possibly later today.

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
thanks for bringing this new feature to dupReport It is working now in all my use cases with warnings, fails and errors in several Duplicati backup reports. It also works on the GMX mail server in both cases when the keyword(s) are placed at the beginning or at the end of dupReport subject line.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

Great to hear! Let's leave it running for a few days to see if it gives you any problems. If it's still looking good after the weekend I will promote it to the master branch.

from dupreport.

HandyGuySoftware avatar HandyGuySoftware commented on July 20, 2024

@wechsler42 , how is the change working for you? Did you have any problems over the weekend?

from dupreport.

wechsler42 avatar wechsler42 commented on July 20, 2024

Hi there,
it is working without any flaws.
Thanks again for implementing this feature!

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.