fix(k8s/grocy): open SQLite database read-only in backup job

This commit is contained in:
2026-09-16 11:42:36 +03:00
parent f2f3711faa
commit 555246f00e
+3 -1
View File
@@ -25,8 +25,10 @@ spec:
- sh
- -c
- |
set -e
apk add --no-cache sqlite
sqlite3 /db-local/grocy.db ".backup /backup/grocy.db"
sqlite3 "file:/db-local/grocy.db?mode=ro" ".backup /backup/grocy.db"
[ "$(sqlite3 /backup/grocy.db 'PRAGMA integrity_check')" = ok ]
volumeMounts:
- name: db
mountPath: /db-local