fix(server): fix MongoDB compose restore gzip filename mismatch#3916
Open
surajmgr wants to merge 1 commit intoDokploy:canaryfrom
Open
fix(server): fix MongoDB compose restore gzip filename mismatch#3916surajmgr wants to merge 1 commit intoDokploy:canaryfrom
surajmgr wants to merge 1 commit intoDokploy:canaryfrom
Conversation
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?
Fix MongoDB restore failure for Docker Compose deployments where restore attempted to unzip
backup.sql.gzeven when the downloaded file had a timestamped name.Root cause
Compose restore did not pass
backupFileintogetRestoreCommand, so Mongo restore used a fallback filename (backup.sql.gz) that often did not exist.Changes
backupInput.backupFilefrom compose restore intogetRestoreCommand.*.gzfile in/tmp/dokploy-restorewhen explicit filename is missing.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
closes #3789
Screenshots (if applicable)
Greptile Summary
This PR correctly fixes the root cause of MongoDB restore failures for Docker Compose deployments. The changes are:
compose.ts: Now passes
backupInput.backupFiletogetRestoreCommand(previously omitted), which was the direct cause of Mongo restore using an incorrect fallback filename.utils.ts: Improves the shell script logic with better error handling:
.gzfile in the temp directoryThe root-cause fix directly addresses the stated issue. The identical rclone copy pattern is already used in
mongo.ts(which works in production), providing confidence that the fallback logic is sufficient.Confidence Score: 5/5
Last reviewed commit: b4079da
(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used: