Phase 5.15: Automated backup system with pg_dump, file backup, retention, restore, notifications

This commit is contained in:
Agent Zero
2026-07-23 22:48:19 +02:00
parent 66b6c32ed8
commit 9cfc6bf3b0
5 changed files with 1006 additions and 0 deletions
@@ -34,6 +34,8 @@ class SystemNotifPlugin(BasePlugin):
"user.created",
"workflow.completed",
"notification.created",
"backup.completed",
"backup.failed",
],
migrations=[],
permissions=["system_notif:read"],
@@ -112,6 +114,14 @@ class SystemNotifPlugin(BasePlugin):
"""
await self._create_system_notification(payload, event_type="notification.created")
async def on_backup_completed(self, payload: dict[str, Any]) -> None:
"""Handle backup.completed event → system message."""
await self._create_system_notification(payload, event_type="backup.completed")
async def on_backup_failed(self, payload: dict[str, Any]) -> None:
"""Handle backup.failed event → system message (error)."""
await self._create_system_notification(payload, event_type="backup.failed", severity="error")
async def _create_system_notification(
self,
payload: dict[str, Any],
@@ -155,6 +165,8 @@ class SystemNotifPlugin(BasePlugin):
"user.created": "Neuer Benutzer",
"workflow.completed": "Workflow abgeschlossen",
"notification.created": "Benachrichtigung",
"backup.completed": "Backup erfolgreich",
"backup.failed": "Backup fehlgeschlagen",
}
title = event_titles.get(event_type, event_type)