Skip to content

Fix system backup download execution#10

Merged
dankritz merged 1 commit into
mainfrom
codex/fix-backup-download
Apr 30, 2026
Merged

Fix system backup download execution#10
dankritz merged 1 commit into
mainfrom
codex/fix-backup-download

Conversation

@dankritz
Copy link
Copy Markdown
Contributor

Summary

  • Fixes system backup/restore to use plain docker exec against the Postgres container instead of requiring the Compose plugin inside the API container.
  • Locates the Postgres container by Compose labels, with a service-label fallback.

Root cause

The API container has Docker CLI access but does not include the docker compose plugin. The backup endpoint therefore returned 500 on docker compose --project-directory ....

Validation

  • Verified on vibestack.danaconda.se that the replacement label lookup finds vibestack-postgres-1 and docker exec ... pg_dump returns a database dump.
  • npm run typecheck
  • npm test --workspace @vibestack/api
  • npm run build --workspace @vibestack/api
  • git diff --check

Publication note

After merge, publish nightly to the merged commit so the live server can pick up the fix.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented Apr 30, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/api/src/system-backup.ts 146 Defaults to ${project}-postgres-1 if no labeled container found. If the actual container name differs, backup/restore will fail.
Other Observations (not in diff)

No other observations.

Files Reviewed (1 file)
  • apps/api/src/system-backup.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by grok-code-fast-1 · 66,077 tokens

const serviceMatch = byService.split('\n').find(Boolean);
if (serviceMatch) return serviceMatch;

return `${project}-postgres-1`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Defaults to ${project}-postgres-1 if no labeled container found. If the actual container name differs, backup/restore will fail.

Consider adding error handling or validation to ensure the container exists before proceeding.

@dankritz dankritz merged commit ec5eb77 into main Apr 30, 2026
3 checks passed
@dankritz dankritz deleted the codex/fix-backup-download branch April 30, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant