fix: copy hiy.db out of container before dumping — server image has no sqlite3

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
Claude 2026-03-26 15:32:26 +00:00
parent e8d303f184
commit 84ac8f3b9f
No known key found for this signature in database

View file

@ -56,9 +56,11 @@ find_container() {
log "--- SQLite ---" log "--- SQLite ---"
SERVER_CTR=$(find_container server) SERVER_CTR=$(find_container server)
if [ -n "${SERVER_CTR}" ]; then if [ -n "${SERVER_CTR}" ]; then
log "Dumping hiy.db via container ${SERVER_CTR}" log "Copying hiy.db from container ${SERVER_CTR}"
podman exec "${SERVER_CTR}" sqlite3 "${HIY_DATA_DIR}/hiy.db" .dump \ podman cp "${SERVER_CTR}:${HIY_DATA_DIR}/hiy.db" "${STAGING}/hiy.db"
> "${STAGING}/hiy.sql" log "Dumping hiy.db…"
sqlite3 "${STAGING}/hiy.db" .dump > "${STAGING}/hiy.sql"
rm "${STAGING}/hiy.db"
elif [ -f "${HIY_DATA_DIR}/hiy.db" ]; then elif [ -f "${HIY_DATA_DIR}/hiy.db" ]; then
log "Server container not running — dumping from host path…" log "Server container not running — dumping from host path…"
sqlite3 "${HIY_DATA_DIR}/hiy.db" .dump > "${STAGING}/hiy.sql" sqlite3 "${HIY_DATA_DIR}/hiy.db" .dump > "${STAGING}/hiy.sql"