I’m trying to get my email report to include a list of files.
I’m not seeing this option is the job–I’ve tried verbose, debug, etc, but I don’t think those are what I want them to be.
So I’m creating a post script to run a compare, and then directing the email to use that file as input.
The option send-mail-body says that this option can be a filename, but all I’m getting in the email is the name of the filename, not the next.
So while my specific question is whether anyone has gotten the “send-mail-body” option to include the text of a filename, the real question is whether anyone has gotten a list of files to be included in the email notification.
In what way is the --verbose Advanced option not doing what you want?
Verbose: Use this option to increase the amount of output generated when running an option. Generally this option will produce a line for each file processed.
Is it maybe showing ALL files (as in “processed” means anything even looked at)?
The options --full-result and --verbose apply to the local copy of the results. If you go to “Log” and then expand the “Result” you should see more data.
I decided that the list of files can be so large that it would be problematic to send it by email (I have seen compressed file lists larger than 4GiB).
If you want the file list to be included in full, some code needs to be added.
This line expands the result object to a string for inclusion in the email:
We can add something like %FILES% that gets expanded to the list of files. It is slightly difficult to get the full file list because it is not kept in memory.
@kenkendk I appreciate the thorough reply.
The other item to note is that specifying a file as the contents of the email doesn’t seem to be working.
My workaround was to specify a post script that runs a compare, which will give me the info I’m looking for–but when I set the backup job to include that path, it just notes the filename.
Is that something I log in github?
I tried to set send-mail-body to include d:\log\backuplist.txt, but it isn’t pulling text from that file, just listing the file name.
The only thing I can think of is that I’m running Duplicati as a service. I need to test again with a non-service install to verify before I open a ticket in github
update: tested this on another system, and I got it to work, both in as a service account and as a standard install. Seems that the key is to only have the file name (full path) instead of also including %RESULT%
I’m still poking at this, but I think my solution is going to be to not use the built in emailing, but rather just set up my own post script.
Not sure what I would log as an enhancement request at this point.
@JonMikelV I would have thought, but it was actually trying to add to the default %RESULT% additional info. I’m going to see if I can figure out how to export that info as part of my script, since the stats are useful.