feat(backup): replace JSON import/export with SQLite database backup system

Replace the JSON-based import/export with a proper backup system that copies
the SQLite database file directly. Supports manual on-demand backups, periodic
scheduled backups via node-cron, configurable retention, file download, and
full database restore.

- Add backupService with VACUUM INTO for safe DB copies
- Add backupScheduler following healthcheckScheduler pattern
- Add 6 admin API endpoints (create, list, download, restore, delete, schedule)
- Add BackupPanel UI with backup table, confirmation dialogs, schedule config
- Add backup fields to SystemSettings schema
- Remove old ImportExportPanel, exportService, importService, and related code
This commit is contained in:
2026-04-02 23:16:18 +03:00
parent d479726fe3
commit b0439e39c4
24 changed files with 1079 additions and 1183 deletions
+3
View File
@@ -201,6 +201,9 @@ model SystemSettings {
healthcheckDefaults String @default("{}") // JSON stored as string for SQLite
customCss String?
onboardingComplete Boolean @default(false)
backupEnabled Boolean @default(false)
backupCronExpression String @default("0 3 * * *") // default: daily at 3 AM
backupMaxCount Int @default(10)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}