Add database backup/restore feature with admin UI

- Backup service using VACUUM INTO for WAL-safe atomic snapshots
- Server-side storage in DATA_DIR/backups with download/upload API routes
- Restore with integrity validation and automatic pre-restore safety backup
- Scheduled daily backups via cron with configurable retention
- Admin-only settings UI consolidated under single Server section
- Clean up account section sign-out button, fix switch sub-pixel rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 20:01:10 -05:00
co-authored by Claude Opus 4.6
parent 724893196e
commit e59364e126
13 changed files with 826 additions and 50 deletions
+3
View File
@@ -46,6 +46,9 @@ export const db = new Proxy({} as ReturnType<typeof drizzle>, {
},
});
/** Close the current connection, and clear singletons so the Proxy re-initializes on next access. */
export function closeDatabase() {
globalForDb._client?.close();
globalForDb._client = undefined;
globalForDb._db = undefined;
}