a9c7775bb7
Add backup/restore functionality for the SQLite database. Users can trigger manual backups, configure automatic backups on an interval with retention policies, list/download/delete backups, and restore from any backup. - Backup engine using VACUUM INTO (safe with WAL mode) - Backup metadata tracked in DB, files stored in DATA_DIR/backups/ - Settings: backup_enabled, backup_interval_hours, backup_retention_count - API: POST/GET/DELETE /api/backups, download, restore endpoints - Autobackup via cron scheduler with configurable interval - Retention: prune on startup, after each backup (manual and auto) - Orphan cleanup: removes backup files without metadata on startup - Restore: replaces DB and triggers graceful server shutdown - Settings UI: /settings/backup with toggle, interval, retention config - Backup list with download, delete, restore actions - i18n: English and Russian translations
44 lines
1.6 KiB
Markdown
44 lines
1.6 KiB
Markdown
# Feature: Backup Management
|
|
|
|
**Branch:** `feature/backup-management`
|
|
**Base branch:** `main`
|
|
**Created:** 2026-04-02
|
|
**Status:** 🟡 In Progress
|
|
**Strategy:** Big Bang
|
|
**Mode:** Automated
|
|
**Execution:** Direct
|
|
|
|
## Summary
|
|
|
|
Add manual and automatic backup/restore functionality for the SQLite database.
|
|
Users can trigger backups on demand, configure autobackup on an interval with
|
|
retention policies, list/download/delete backups, and restore from a backup.
|
|
|
|
## Build & Test Commands
|
|
- **Build (Go):** `go build ./cmd/server`
|
|
- **Build (Frontend):** `cd web && npm run build`
|
|
- **Check (Frontend):** `cd web && npm run check`
|
|
- **Dev server:** `./scripts/dev-server.sh`
|
|
|
|
## Phases
|
|
|
|
- [ ] Phase 1: Backup engine & settings [domain: backend] → [subplan](./phase-1-backup-engine.md)
|
|
- [ ] Phase 2: Backup API endpoints [domain: backend] → [subplan](./phase-2-backup-api.md)
|
|
- [ ] Phase 3: Backup settings & management UI [domain: frontend] → [subplan](./phase-3-backup-ui.md)
|
|
- [ ] Phase 4: Retention & cleanup [domain: backend] → [subplan](./phase-4-retention.md)
|
|
|
|
## Phase Progress Log
|
|
|
|
| Phase | Domain | Status | Review | Build | Committed |
|
|
|-------|--------|--------|--------|-------|-----------|
|
|
| Phase 1: Backup engine & settings | backend | ⬜ Not Started | ⬜ | ⬜ | ⬜ |
|
|
| Phase 2: Backup API endpoints | backend | ⬜ Not Started | ⬜ | ⬜ | ⬜ |
|
|
| Phase 3: Backup UI | frontend | ⬜ Not Started | ⬜ | ⬜ | ⬜ |
|
|
| Phase 4: Retention & cleanup | backend | ⬜ Not Started | ⬜ | ⬜ | ⬜ |
|
|
|
|
## Final Review
|
|
- [ ] Comprehensive code review
|
|
- [ ] Full build passes
|
|
- [ ] Full test suite passes
|
|
- [ ] Merged to `main`
|