fix: hourly-backup 改用 python sqlite3 API #38

Merged
fam merged 2 commits from fix/hourly-backup-sqlite3 into main 2026-04-15 10:10:13 +00:00
Contributor

问题
镜像里没装 sqlite3 CLI,hourly-backup.backup 命令 15 天前就静默失败了(job 返回码 0 因为 sqlite3: not found 后面没有其它检查)。/data/backups 里最新一份还是 2026-03-31。

修复
改用镜像内置的 python3 -c "import sqlite3; s.backup(d)",效果等同于 .backup 命令,保证 WAL 一致性快照。

不影响
daily-minio-backup(一直正常),每天备份上传到 MinIO,今天还在跑。

**问题** 镜像里没装 `sqlite3` CLI,`hourly-backup` 的 `.backup` 命令 15 天前就静默失败了(job 返回码 0 因为 `sqlite3: not found` 后面没有其它检查)。`/data/backups` 里最新一份还是 2026-03-31。 **修复** 改用镜像内置的 `python3 -c "import sqlite3; s.backup(d)"`,效果等同于 `.backup` 命令,保证 WAL 一致性快照。 **不影响** `daily-minio-backup`(一直正常),每天备份上传到 MinIO,今天还在跑。
fam added 1 commit 2026-04-15 09:56:50 +00:00
fix: hourly-backup 改用 python sqlite3 API 做一致性备份
Some checks failed
Test / unit-test (push) Successful in 5s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 4s
Test / e2e-test (push) Failing after 6m1s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 8s
a8c9c2252f
镜像里没有 sqlite3 CLI,原来的 .backup 命令 15 天前就静默失败了。
daily-minio-backup 用 cp 就够,但 hourly 每小时跑要求更强一致性,
改用 Python 内置 sqlite3 的 .backup() API。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner

🚀 Preview: https://pr-38.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-38.oil.oci.euphon.net DB is a copy of production.
fam added 1 commit 2026-04-15 10:05:24 +00:00
ci: retrigger after Batch 2 timeout flake
All checks were successful
PR Preview / test (pull_request) Has been skipped
Deploy Production / test (push) Successful in 6s
PR Preview / teardown-preview (pull_request) Successful in 13s
PR Preview / deploy-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 5s
Test / e2e-test (push) Successful in 2m59s
bf29551a31
Owner

🚀 Preview: https://pr-38.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-38.oil.oci.euphon.net DB is a copy of production.
fam merged commit bf29551a31 into main 2026-04-15 10:10:13 +00:00
Owner

🗑️ Preview torn down.

🗑️ Preview torn down.
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hera/oil-formula-calculator#38