Send-email: variable for duration?

Does a variable exist to include the backup duration to the email body?

Alternatively StartTime and EndTime of the backup?

Welcome to the forum!

No, there is no environment variable that represents backup duration. This could probably be added without too much difficulty. If you really would like this feature, feel free to submit a suggestion request in the Github Issues area: Issues · duplicati/duplicati · GitHub

In the meantime, an alternative solution I could suggest is to use the excellent third party site. You can quickly see status and reports for all your Duplicati backups in a nice UI. Here’s a sample that shows backup durations for my backups:

Thank you, @drwtsn32 for your kind response. I have made the respective feature proposal on Github:

I’m confused about the goal. Duration is in the default email body along with other values, and you can even get JSON values if this is to automate processing. If customized body is needed, then all the result values can be inserted using %RESULT%. See –send-mail-body. What’s awkward is extreme tailoring…

is an example which could probably be worked into ultimate extreme customization, if that was required.

Will any of the above help?

I currently use %RESULT% as workaround. However, %RESULT% create extensive amount of additonal, mostly undesired details.

You could potentially do some text parsing in your batch script to extract what you’re interested in from %RESULT%