fix: require verified pre-reset backup and protect unsynced work (#7)
This commit is contained in:
1 parent
1ada8c12e2
commit
15f81e053c
8 files changed
+389
-66
No files matched your search
@@ -53,3 +53,21 @@ Archive name:
|
||||
4. replace `config.yaml` if needed;
|
||||
5. restart the app;
|
||||
6. re-enter MariaDB credentials if the original encryption key is unavailable.
|
||||
|
||||
## Pre-reset safety backup
|
||||
|
||||
Before clearing any table, `-reset-localdb` creates a fresh ZIP under
|
||||
`<backup root>/pre-reset/qfs-pre-reset-v1-<UTC timestamp>-<unique>.zip`, outside
|
||||
normal retention and regardless of `QFS_BACKUP_DISABLE`. The archive contains
|
||||
a consistent SQLite snapshot and the selected config when present. Every ZIP
|
||||
entry is read back for CRC validation; the extracted database must pass SQLite
|
||||
`integrity_check`. A backup or verification failure prevents the reset. The
|
||||
backup directory must also resolve outside git after following symlinks.
|
||||
|
||||
Reset refuses queued changes and any project/configuration not marked `synced`,
|
||||
including NULL/legacy states. A missing sync-status column also blocks reset.
|
||||
Only `-reset-localdb -force-reset-localdb` bypasses this data check. Deletions run
|
||||
in one transaction and preserve connection settings. Missing legacy tables are
|
||||
skipped. Use the restore procedure above for the pre-reset archive; retain it
|
||||
until the reset has been verified. The environment reset switch was removed to
|
||||
prevent repeated destructive startup.
|
||||
Reference in new issue
Block a user