Comments (9)
This (both multiple notification backends as well as notification levels, info
and error
for now) is now released as v2.6.0
.
from docker-volume-backup.
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.
@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.
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.
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.
@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.
@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:
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.
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.
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)
- Hard to understand error message during exec HOT 3
- archive-pre is triggered on each container backup instead of just container with exec-label HOT 3
- Health Check HOT 6
- Notifications Delay HOT 1
- Replace Log line feeds with HTML <br> tag HOT 3
- Backup the entire content without directory HOT 4
- Backup to subfolders HOT 2
- Resolve date in AWS_S3_PATH HOT 1
- Can't get stop during backup working HOT 2
- Remove local backup after upload to S3 HOT 3
- Invalid memory address crash when running a backup HOT 16
- Fail to configure cron schedule HOT 3
- Docker swarm error HOT 5
- "swarm exec" support HOT 1
- "input/output error" when copying file to NFS mount HOT 4
- Azure storage: Support access tier HOT 2
- schedule the docker-volume-backup? HOT 1
- [Feature] Automated backups of all named volumes HOT 6
- [FR] upgrade `shoutrrr` to v0.8.0 to support custom fields in calls to Generic Webhooks HOT 3
- [Feature] Allow BACKUP_COMPRESSION to be disabled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-volume-backup.