Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Addresses feedback from #282 that docker cp commands could fail silently, leading to incomplete backups or tar failures at line 107.

Changes

Added explicit error handling to all critical docker cp operations:

  • Filesystem copies (config/production, storage, addons)
  • Database backup file
  • Volume data (redis-data, caddy, meilisearch, qdrant)

Each operation now fails fast with a descriptive error message:

docker cp supportpal:/var/www/supportpal/storage "${TMP_DIR}/filesystem-${TIMESTAMP}/" || { echo "error: failed to copy storage from container"; exit 1; }

This prevents the final tar command from creating incomplete archives when source files are missing.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Address feedback on backup script refactor Add error checking to docker cp operations in backup script Nov 12, 2025
Copilot AI requested a review from bytestream November 12, 2025 13:12
Copilot AI and others added 2 commits November 12, 2025 14:44
Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>
@bytestream bytestream force-pushed the copilot/sub-pr-282-again branch from 430b449 to 59dcdc0 Compare November 12, 2025 14:45
@bytestream bytestream marked this pull request as ready for review November 12, 2025 14:45
@bytestream bytestream merged commit 3eff6b8 into backup Nov 12, 2025
2 of 3 checks passed
@bytestream bytestream deleted the copilot/sub-pr-282-again branch November 12, 2025 14:46
bytestream added a commit that referenced this pull request Dec 18, 2025
…282)

* refactor(docker-monolithic): refactor backup script to use docker cp

* Fix docker cp trailing slashes in backup script (#286)

* Initial plan

* fix: remove trailing slashes from docker cp source paths

Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>

* Fix TMP_DIR dependency on ABS_BACKUP_PATH by moving mkdir earlier (#285)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>

* Add error checking to docker cp operations in backup script (#284)

* Initial plan

* Add error checking to docker cp operations in backup script

Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants