From 84ac8f3b9fe865331facc26a3c59503670473542 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Mar 2026 15:32:26 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20copy=20hiy.db=20out=20of=20container=20b?= =?UTF-8?q?efore=20dumping=20=E2=80=94=20server=20image=20has=20no=20sqlit?= =?UTF-8?q?e3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH --- infra/backup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infra/backup.sh b/infra/backup.sh index a15e4c9..feaa894 100755 --- a/infra/backup.sh +++ b/infra/backup.sh @@ -56,9 +56,11 @@ find_container() { log "--- SQLite ---" SERVER_CTR=$(find_container server) if [ -n "${SERVER_CTR}" ]; then - log "Dumping hiy.db via container ${SERVER_CTR}…" - podman exec "${SERVER_CTR}" sqlite3 "${HIY_DATA_DIR}/hiy.db" .dump \ - > "${STAGING}/hiy.sql" + log "Copying hiy.db from container ${SERVER_CTR}…" + podman cp "${SERVER_CTR}:${HIY_DATA_DIR}/hiy.db" "${STAGING}/hiy.db" + log "Dumping hiy.db…" + sqlite3 "${STAGING}/hiy.db" .dump > "${STAGING}/hiy.sql" + rm "${STAGING}/hiy.db" elif [ -f "${HIY_DATA_DIR}/hiy.db" ]; then log "Server container not running — dumping from host path…" sqlite3 "${HIY_DATA_DIR}/hiy.db" .dump > "${STAGING}/hiy.sql"