Repository navigation
fix(volume-backups): accept tar exit 1 when backing up live volumes - #5800
Merged
narcisonunez merged 1 commit intoOct 30, 2026
Merged
Conversation
narcisonunez
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
backupVolume(packages/server/src/utils/volume-backups/backup.ts) runstar cvfunderset -e. GNU tar exits with1when a file changes while it is being read, which is normal for a volume that is still being written, so a backup with "Turn off container" disabled stopped attar: ./<file>: file changed as we read itand never uploaded (#5792). For services that write continuously, turning off the container was the only mode that worked.This accepts tar exit
1and still fails on2or higher. The$?is escaped so it is evaluated inside the container'sbash -c; unescaped, the outer shell would expand it first and the check would always fail. tar still prints the warning, so the log shows which files changed.Verified with new tests in
apps/dokploy/__test__/backups/volume-backup-tar-exit.test.tsthat run the command generated bybackupVolumewith tar stubbed to exit1(the backup uploads) and2(it fails without uploading). The first fails oncanaryand passes with this change. Also checked against a real volume with a container appending to a 300 MB file: oncanarythe backup stops after the tar warning, and with this change it continues to the upload and cleanup.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes #5792
Screenshots (if applicable)
N/A - covered by unit tests for the generated backup command.


Confidence Score: 5/5
The PR appears safe to merge.Summary
The PR lets volume backups continue when GNU tar reports that files changed while being read.
Reviews (1) · Last reviewed commit: "fix: accept tar exit 1 in live volume ba..." · Reviewed by Greptile