feat: automatische geplante Backups mit Rotation

Phase 1.3 - Automatische Backups:
- Cron-basierter Scheduler (Standard: täglich 2 Uhr)
- Konfigurierbar über .env (Zeitplan, Verzeichnis, Anzahl)
- Automatische Rotation: behält nur letzte N Backups (Standard: 7)
- UI in Settings → Backup: Status-Anzeige und manueller Trigger
- Tests: 7 erfolgreiche Tests für Scheduler-Funktionalität

Neue Umgebungsvariablen:
- BACKUP_ENABLED (Standard: true)
- BACKUP_SCHEDULE (Standard: 0 2 * * *)
- BACKUP_DIR (Standard: ./backups)
- BACKUP_KEEP (Standard: 7)
- TZ (für Zeitzone)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-05-04 07:02:38 +02:00
parent 99a2280c02
commit 9b29d1847c
11 changed files with 484 additions and 3 deletions
+16 -1
View File
@@ -967,7 +967,22 @@
"backupRestoredToast": "Database restored. Reloading...",
"backupCliTitle": "CLI / Docker Compose restore",
"backupCliHint": "For operational restores, stop the app, mount the backup in a temporary container and replace the database file.",
"backupCliBackupHint": "You can also create a backup directly from Docker Compose:"
"backupCliBackupHint": "You can also create a backup directly from Docker Compose:",
"backupSchedulerTitle": "Automatic Backups",
"backupSchedulerHint": "Scheduled backups are created automatically and old backups are rotated.",
"backupSchedulerStatus": "Status",
"backupSchedulerEnabled": "Enabled",
"backupSchedulerDisabled": "Disabled",
"backupSchedulerSchedule": "Schedule",
"backupSchedulerKeep": "Retention",
"backupSchedulerKeepCount": "{{count}} backups",
"backupSchedulerLastBackup": "Last backup",
"backupSchedulerLastSuccess": "{{date}} (successful)",
"backupSchedulerLastFail": "{{date}} (failed)",
"backupSchedulerNever": "No backup created yet",
"backupSchedulerTrigger": "Create backup now",
"backupSchedulerTriggering": "Creating backup...",
"backupSchedulerTriggeredToast": "Backup created successfully."
},
"login": {
"tagline": "Family planning. Secure. Privacy-friendly. Open source.",