[#7698] send system email alerts to superusers in case of an error with the automated backups

This commit is contained in:
Gani Georgiev
2026-05-26 16:54:45 +03:00
parent 40c631db32
commit d4026ce60f
4 changed files with 271 additions and 1 deletions
+13
View File
@@ -322,6 +322,19 @@ func (app *BaseApp) registerAutobackupHooks() {
slog.String("name", name),
slog.String("error", err.Error()),
)
alertError := sendSystemAlertToAllSuperusers(
app,
"Autobackup failure",
"Failed to create/upload automated backup. Raw error:\n"+err.Error(),
)
if alertError != nil {
app.Logger().Warn(
"[Backup cron] Failed to send backup error alerts",
slog.String("name", name),
slog.String("error", alertError.Error()),
)
}
}
maxKeep := app.Settings().Backups.CronMaxKeep