Send mail only when backup fails

Can you send mail only when the backup fails?

3 Likes

This is not supported yet but will be considered.

Thank you, for me it is a very important option, I cannot be checking the dozens of emails of my clients’ facilities on a daily basis.
Simply that the mail arrives from the backups that are failing.

You may find some ideas in this topic:

1 Like

@Carlos1, also note that you can use http://healthchecks.io with Duplicacy GUI without scripting! The trick is to use mail:

  1. Create a test in healthchecks.io. Copy the ID. It looks something like this (but only hexadecimal values):
    5323423c-c4x3-4cdx-3c1x-c313cx31x12x
    This means your test would have the mail address
    5323423c-c4x3-4cdx-3c1x-c313cx31x12x@hc-ping.com
    In Settings, create a Filter to require a word in the mail subject that indicates success.
    (embarrassingly I don’t use GUI so haven’t tried this!)

  2. In Duplicacy GUI, set up the job to send mail to that address.

  3. Now you should only get a mail from healthchecks.io if your backup failed.
    (The next fail will not send further mails so you will not be flooded)
    And you can still log into your page on healthchecks.io to see logs on all jobs! (the last 100 at least)

4 Likes


@akvarius, I am very interested in the solution you offer me because I am stuck with the GUI version.
I have done some tests and the healthchecks.io service works great but I have some doubts when any of the backups are not completed correctly
For example:
I have a backup schedule where everyone performs correctly except one that fails, but the mail arrives correctly at the healthchecks.io service, assuming that backups are being done well–
Do we have any way to avoid false positives?
Or some way to avoid not sending the notification if one of the backups failed.
I feel my English…
Thank you

1 Like

Hi carlos1,
First I am not affiliated with healthchecks.io in any way, I just find it useful! :slight_smile:

As I mentioned I’m not using GUI (I use custom scripts and the CLI version), but I remember a previous discussion that GUI didn’t (at that time) provide a variable status in subject but perhaps this has changed? (perhaps others could check!)

@carlos1, could you post how the mail subject (not the contents of the mail) looks like for a task where all jobs where successful and how it looks when one or more jobs failed (remove personal info first). Maybe there’s room for improvement!

One possible solution to that problem could be to separate your jobs in several schedules so that there’s one mail per job, and optionally one healthchecks.io test per job.

BTW (and this is the biggest benefit of using healthchecks): Setting a reasonable schedule on your test means healthchecks.io will also report a missing backup (for any reason), not only a failed backup.

thanks @akvarius,
I have performed different tests on the web veriosn, the value that it sends you in the subject of the mail is independent if the backup was done correctly or badly. (Take only the value you set in the mail form).
@gchen If the developer took into account a variable% status% in the subject field and use together with the healthchecks.io service to filter the mail we could monitor the backups in a very stable and reliable way.
Without this improvement in the web version it is difficult to implement a massive form in all my clients.

For now, you can enter {{status}} in the subject which will be replaced by the job status (either success or error).

5 Likes

Solved, with the variable in the subject I can already do the monitoring of all my backups through the healthchecks.io service
Thank you

1 Like

Is there any way to customize the body of the mail. It gets very long if a lot of files are backed up or a lot of chunks are copied. Plus, I don’t want to send filenames to an external monitoring service.

1 Like

Welcom to the forum, @bioschaf!
This thread is about sending mail from GUI which might not help you with that (now at least). You might run Duplicacy CLI and pipe output through a filter (e.g. Gnu Sed or a script in powershell). If you do this you can use curl (or powershell) to send the resulting file to the monitoring service.

Some examples:

(But this is not a good answer for the question of this thread)

1 Like

I can add an option to send summary only.

4 Likes