Skip to content

Write dump files to /tmp and clean them up after upload#26

Open
n1mmy wants to merge 2 commits into
itbm:masterfrom
n1mmy:upstream/tmp-dump-files
Open

Write dump files to /tmp and clean them up after upload#26
n1mmy wants to merge 2 commits into
itbm:masterfrom
n1mmy:upstream/tmp-dump-files

Conversation

@n1mmy

@n1mmy n1mmy commented May 5, 2026

Copy link
Copy Markdown

Summary

Two small, related changes to backup.sh:

  1. Use /tmp for the intermediate dump file (commit 1) instead of the container's working directory. This makes it easy to mount a larger volume at /tmp for databases whose dump exceeds the default container filesystem.
  2. Clean up the dump file after upload (commit 2), so successive runs (especially with a persistent /tmp volume) don't accumulate stale dumps. Also adds defensive rm -f before each new dump in case a previous run failed before reaching the post-upload cleanup.

Changes

  • backup.sh: change SRC_FILE from dump.dump / dump.sql.gz to /tmp/dump.dump / /tmp/dump.sql.gz
  • backup.sh: rm -f $SRC_FILE after the upload, and defensively before each dump invocation

n1mmy added 2 commits May 5, 2026 09:44
That way I can mount a bigger volume there.
Remove existing dump files before creating new backups. In case volume is persistent and there are failures
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