Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OS notifications #585

Open
Schroedingers-Cat opened this issue Nov 27, 2024 · 2 comments
Open

Support OS notifications #585

Schroedingers-Cat opened this issue Nov 27, 2024 · 2 comments
Labels
enhancement New feature or request good first issue

Comments

@Schroedingers-Cat
Copy link

Is your feature request related to a problem? Please describe.
If scheduled backups fail silently in the background, users might not notice (for instance, they're not looking into the log files) and are without backups for days or weeks.

Describe the solution you'd like
Every OS these days has support for notifications and it would be great if backrest would add support for that. The feature list mentions notification support for third-party services like Discord or Slack, but a local notification would be useful as well, esp. as default value for a new configuration.

Notifications could be sent when a backup finishes, fails or misses a variable amount of runs.

Additional context
I'm currently using custom scripts to create those notifications on Linux and Windows but that is not a viable solution to a lot of users.

@Schroedingers-Cat Schroedingers-Cat added the enhancement New feature or request label Nov 27, 2024
@garethgeorge
Copy link
Owner

garethgeorge commented Dec 10, 2024

Looks like this is something backrest could integrate support for with https://github.com/gen2brain/beeep .

Hook types are relatively straightforward to add to the hook registry https://github.com/garethgeorge/backrest/tree/main/internal/hook/types though some amount of plumbing is needed for UI support.

I agree that native support is a good idea, this is fairly low priority for me as scripts are a solid workaround -- but it is the most common scripting use case from what I see in discussions. Current projects on my plate are multihost synchronization and improving the form system, but I've tagged it as a good first issue as it's pretty approachable.

@Schroedingers-Cat
Copy link
Author

scripts are a solid workaround

Yes, scripting gets the basics done (notification per executed backup job).

Looking at how backup notifications are done on Windows 10 or on macOS, I think those solutions are, however, more reliable than scripts. For instance, backups might start only if the computer is on power supply or if it can reach a specific host or network. Now, should those conditions never be met for instance for two weeks or a month, Windows and macOS will create a notification to make users aware about this. Another example is a monthly backup job I scheduled using resticprofile including notifications on errors, but that job didn't execute for months so none of my notification scripts got actually triggered.

On both cases, you'd be receive a warning on Windows and macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue
Projects
None yet
Development

No branches or pull requests

2 participants