feat(backup): tar.gz format with uploads + manifest, restore guard

- New tar.gz backup format bundling SQLite snapshot + uploads tree + manifest.json (version, app+schema versions, checksums, dbSize)
- BACKUPS_DIR env override; defaults to /app/data/backups in prod, <cwd>/data/backups in dev (matches uploads convention)
- 503 guard in hooks.server.ts while restore is mid-flight (DB file is being swapped); excludes static assets + /api/health; sets Retry-After: 15
- Legacy .db restore still supported (DB-only)
- Restore endpoint adds schema-mismatch detection + force flag; download/schedule endpoints updated
- 256 MiB free-disk safety margin before backup
- tar dep added to package.json; 18 new backupService tests
- i18n labels (en + ru) for new restore/format states
This commit is contained in:
2026-05-28 14:39:24 +03:00
parent 0a13b6b58c
commit 555ac9ea63
15 changed files with 1068 additions and 108 deletions
+1
View File
@@ -42,6 +42,7 @@
"svelte-i18n": "^4.0.1",
"sveltekit-superforms": "^2.22.0",
"tailwind-merge": "^2.6.0",
"tar": "^7.5.15",
"zod": "^3.24.0"
},
"prisma": {