You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v3.0.24: feat(backup): implement automatic scheduled backups and recovery
- Add configuration fields for scheduled backups to AppConfig in
src/config.rs, including enabled status, interval, and retention count.
- Introduce a background backup scheduler in src/cmd/serve.rs that runs
periodically based on the defined interval.
- Implement backup rotation in src/data/backup_manager.rs to maintain a
fixed number of recent backups.
- Add robust automatic recovery in src/data/repository.rs: if the database
fails to open, the application now attempts to restore the latest
verified-good backup from the backup folder, renaming the corrupt
database file for forensic preservation.
- Introduce BackupFileLock in src/ipc.rs, a low-level file lock that
allows long-running background tasks (like the scheduler) to safely
manage backup mutual exclusion without triggering premature process
exits, separating this logic from the CLI-specific OperationLock.
- Consolidate backup filename generation and listing logic in
src/data/backup_manager.rs to standardize backup handling across both
manual CLI commands and the new automated system.
- Add unit and integration tests for backup rotation, name generation,
and recovery behavior to ensure system reliability during data
corruption events.