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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user