Duplicacy and push notifications to phone [Guide]

I just wanted to share how I configured my Duplicacy home server install to push status notifications to my phone after job completion.

I didn’t want daily mails on job completion, since I prefer a phone notification for stuff like this. I’ve used Pushover before with success, so as soon as I saw that you could post to a URL on completion I decided to implement push notifications for my schedule as well.

You will need:

  • A Pushover account. https://pushover.net/. I am not affiliated with Pushover. They give you a 30 day trial, after that it’s a one time cost for all your personal devices (4.99$ right now). They give you 7500 free notifications a month, which should suffice to any home server needs you might have.
  • Pushover app installed on your phone (Android or iPhone).
  • A working Duplicacy install with at least one scheduled backup.
  1. Create an Application in Pushover. This gives you an API token. This token can be used by anyone to push notifications to your phone, so keep it safe :slight_smile:
  2. Create a report.tmpl in your .duplicacy-web directory in order to craft the correct JSON payload for Pushover. You can find your User token on the Pushover dashboard.
    My template looks like this:
    {
    “BackupResult”: “{{.result}}”,
    “BeginTime”: {{.start_time}},
    “TotalFiles”: {{.total_files}},
    “Storage”: “{{.storage_url}}”,
    “token”: “YOUR_APP_TOKEN”,
    “user”: “YOUR_USER_TOKEN”,
    “message”: “Backup {{.result}}. {{.total_files}} files in {{.directory}}”,
    “title”: “Backup Completed”
    }
  3. Configure the report address in the UI:
    backup_report
  4. Upon completion you should receive a notification like this:
  5. You can see what’s possible with the push notification here: Pushover: API

I hope someone can use this small guide :slight_smile:

4 Likes

Great Post! Can you do the same for the CLI version?

But why though? Isn’t the goal to minimize distractions in life, not add more noise in the form of useless notifications? It’s not like it’s an emergency or like you need or even able to address it right away.

Backup is a background low priority task. Unless if failed 10 times in a row I don’t want to know about it even in the form of email, let alone push notification (I have all notifications disabled on my phone for that matter. Including for texts for all but a narrow circle of people). I’ll get to checking email when I feel like it, but even email is too vocal for a backup service.

Just my 0.02.

I think we’re in a technical forum about Duplicacy and not in some life hacking/zen forum. I came here to learn about Duplicacy related tips and tricks and not to hear that my goal in life is wrong. But hey, to each his own.

1 Like

Technology exists to help address real world problems. Adding more noise to a real world is not a problem that requires solving. Often instead of grinding through granite to the solution it’s worth to stop and re-assess – perhaps it’s a wrong problem to need to solve? And the forum also exists to express opinions. That was my opinion.

BTW, I meant to post that comment to the topic, not in response to your comment, sorry about that.

Some phones these days have a ‘silent’ notification section which can be good for when you want to look at relevant happenings at a glance and not get distracted…

While I wouldn’t use push notifications myself, I can see such a thing being pretty darn useful when, for instance, you’ve set up a number of clients with Duplicacy and need to know ASAP when they’ve failed - especially when you have another alert saying their site is offline and you wanna make darn sure there’s a recent-ish backup and access to their systems isn’t yet possible.

Backup is one of the absolutely highest priorities as far as I’m concerned. Although it would be nice (and probably easy to script outside the GUI) a system where say 3 failures in a row would trigger a report / notification.

Anyway, there’s plenty of use cases so thanks for the instructional, @morten.vitved

2 Likes

Thanks for this tip, Morten!
I see that Pushover can be integrated with healthchecks:
https://healthchecks.io/integrations/add_pushover/

Normally I use healthchecks with the mail integration (mail which I receive on my phone), but this is another alternative that can be useful. Using healthchecks and Pushover, you will get the push notification only when there is a missing backup or other problem (anything that prevents backup success signal). You will also get monthly mail reports about the status; helpful if total silence is scary!

Since you use Web GUI you can set up :d: to report to healthchecks.io like this:
Alert if no recent backups?
or if using CLI/commandline:
Monitor backups status using healthchecks.io (Windows/CLI)

Because I needed it. Minimizing distractions is fine. Not knowing the status of my backup is a distraction for me. The notification isn’t. I needed this and wanted to share it.

Backup is not a low priority task for me in this case. I want to know the status of my daily backup, and a notification works for me. An email I have to act on. This I just swipe and move on.

You could change the report template to only notify on fails or do some other filtering if you’d like. There are possibilities to finetune this in both duplicacy and Pushover.

1 Like

You keep calling it noise. This is not noise for me. I had a problem. I solved it.

1 Like