feat(FN-5407): add paired central backup support to backup command and stor
FN-5407 adds paired central backup support to the Fusion task management system, with both the core backup engine and CLI commands updated to handle central database backup pairs. Documentation was updated to reflect the new capability, and two stabilization fixes were included to handle central bac Fusion-Task-Id: FN-5407
This commit is contained in:
committed by
gsxdsm
parent
1a5aff9c44
commit
2baaad743a
@@ -32,6 +32,8 @@ Core tables:
|
||||
|
||||
Per-project task data remains in each repo’s `.fusion/fusion.db`.
|
||||
|
||||
Backups now include this central DB alongside project backups: each `fn backup --create` run writes a paired `fusion-central-<timestamp>(-N).db` next to `fusion-<timestamp>(-N).db` under `.fusion/backups/` in the active project. Restore operations create a central pre-restore snapshot `fusion-central-pre-restore-<timestamp>.db` before replacing `~/.fusion/fusion-central.db`.
|
||||
|
||||
`taskClaims` is the central cross-node lease mutex introduced by FN-4819 §2: claim acquisition/renewal/release happen in `~/.fusion/fusion-central.db`, while per-project lease fields mirror the central winner for local scheduler/runtime consumption.
|
||||
|
||||
Peer/mesh coordination spans core + engine, with startup ownership in CLI process entrypoints:
|
||||
|
||||
@@ -309,6 +309,14 @@ Additional backend notes:
|
||||
|
||||
---
|
||||
|
||||
### Backup pairing behavior (project + central DB)
|
||||
|
||||
Backups in `.fusion/backups/` now capture the project DB and (when present) the global central DB as a pair using the same timestamp/counter:
|
||||
- `fusion-<timestamp>(-N).db` (project)
|
||||
- `fusion-central-<timestamp>(-N).db` (central, from `~/.fusion/fusion-central.db`)
|
||||
|
||||
`BackupManager` supports `includeCentralDb` (default `true`). If central DB is missing or disabled, project backup still succeeds and records a skip reason. Retention (`autoBackupRetention`) is still computed from project backups; when an old project backup is pruned, its matching `fusion-central-*` sibling is pruned too. Restoring a project backup also restores the paired central backup when available; restoring a `fusion-central-*` file restores the central DB only. Pre-restore snapshots use `fusion-pre-restore-<timestamp>.db` and `fusion-central-pre-restore-<timestamp>.db`.
|
||||
|
||||
## 4) SQLite Tables Inventory (`packages/core/src/db.ts`)
|
||||
|
||||
| Table | Purpose |
|
||||
|
||||
Reference in New Issue
Block a user