Scheduled daily DB backup + tested restore; online backup API (#57) #76
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!76
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/57-daily-backup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #57.
run_daily_backup_job, registered in_register_static_jobsalongside the midnight/weekly/yearly crons).backup.pynow usessqlite3.Connection.backup(...)instead ofshutil.copy2, so a live (WAL) DB is never copied mid-write.kindparam → distinct filenames (iris_daily_*vsiris_*) and independent pruning; newDAILY_BACKUP_RETAIN_COUNT(default 14) config +RuntimeSettingsfield +PUT /settingsre-prune side effect (mirrorsbackup_retain_count).docs/troubleshooting.md(stop → replacedata/iris.db→ start → alembic note) and an automated restore test (create → backup → corrupt → restore → verify).Verified:
ruff/format/mypyclean; 250 tests pass with a working temp dir (all new backup/restore/scheduler tests green). Thetest_backup.pyerrors seen on the Windows dev box are a pre-existing stale-ACL onTemp\pytest-of-Ryanthat breaks pytest'stmp_pathsetup for any temp-using test — unrelated to this change and green on the Linux CI runner.Follow-up (not blocking): expose
daily_backup_retain_countin the Settings UI (fold into #48 Batch B).🤖 Generated with Claude Code