Giter Club home page Giter Club logo

Comments (9)

m90 avatar m90 commented on August 23, 2024 1

This (both multiple notification backends as well as notification levels, info and errorfor now) is now released as v2.6.0.

from docker-volume-backup.

m90 avatar m90 commented on August 23, 2024

Email notifications are now implemented after merging #24 which caters for my personal needs and use cases.

I am leaving this issue open in case anyone else has other requirements and wants to add them. I'd be happy to help and review PRs for adding other means of sending notifications.

from docker-volume-backup.

MMauro94 avatar MMauro94 commented on August 23, 2024

@m90 would you consider adding an all-in-one solution regarding notifications, so that anyone can choose the notification service they want? For instance I already use Telegram for a number of things, and I'd love to be able to add backups to it.

I know of Apprise which also has a handy CLI, but it's written in Python so it would have to be installed on the final image, and I know you're concerned about image size. I don't know if something similar written in Go already exists.

from docker-volume-backup.

m90 avatar m90 commented on August 23, 2024

I would be happy to add a all-in-one solution like that in case it checks those two boxes:

  • written in Go so there's no extra stuff to add to the image
  • it can handle emulating the existing email "API" (i.e. the values passed via the environment)

Apprise probably won't work as you mentioned. I found this on a quick search though https://github.com/containrrr/shoutrrr

from docker-volume-backup.

MMauro94 avatar MMauro94 commented on August 23, 2024

That seems to check all the boxes. The email API can be emulated by using the smtp:// URL schema.

Sadly I have zero experience in Go, otherwise I'd start working on a PR

from docker-volume-backup.

m90 avatar m90 commented on August 23, 2024

@MMauro94 There's a PR adding shoutrrr here #37 - I will need to do some more testing before I release this, but in case you want to give it a go already, it would be much appreciated if you could build an image off that branch (docker build -t offen/docker-volume-backup:notifications . from the repo root should be all that is needed) and see if it works for your use case as well.

from docker-volume-backup.

MMauro94 avatar MMauro94 commented on August 23, 2024

@m90 That was fast! I tried the branch with my telegram bot and it works perfectly.

Here's the message I got when I put the archive mount in read-only mode:
image

Another small suggestion: add a config flag to enable sending a message also when the backup completes successfully.

In any case, thanks for the great work! If you need me to do some more testing, don't hesitate to ask

from docker-volume-backup.

m90 avatar m90 commented on August 23, 2024

Thank you very much for testing this, good to know it works well for you too.

add a config flag to enable sending a message also when the backup completes successfully.

I've been pondering this too for a while but I've always thought "let's wait until someone requests it" so I guess here we are 😅

It's relatively simple to add this given the current setup, the only challenge will be finding a good API for setting the config values.

One could either use something like log levels:

NOTIFICATION_LEVEL="info|warn|error" # default is error

or just a binary switch

NOTIFICATION_WHEN="failure|always" # default is failure

What do you think?

from docker-volume-backup.

MMauro94 avatar MMauro94 commented on August 23, 2024

I certainly like the flexibility given by NOTIFICATION_LEVEL more, however there are two things to consider:

  • If I didn't miss anything, currently the only warnings are possible when there are misconfigurations: I don't think it's critical to notify them at the moment, but could be useful if/when other warnings are added.
  • Most imporantly: providing this feature would mean to collect all logs first and then sending them out in a single notification when the program ends (to avoid sending multiple notifications). The simple binary switch would be much simpler to implement.

It depends on how much future-proof you want to be. If I'm right and the notification level requires that much work, I'd go with the binary switch and change it in a future release only if it's needed.

from docker-volume-backup.

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.