fix(backups): honor user-defined S3 prefix#4405
Open
imajus wants to merge 1 commit into
Open
Conversation
The appName segment introduced in Dokploy#3919 was bundled with the actual retention fix and made the user-defined prefix non-authoritative (bucket/{appName}/{prefix}/... instead of bucket/{prefix}/...). Remove the appName insertion from all backup paths (compose, mariadb, mongo, mysql, postgres, web-server) and from keepLatestNBackups. Restore the pre-Dokploy#3919 fallback semantics for volume backups: appName is used only when no prefix is configured. The path.join -> template-string + normalizeS3Path fix from Dokploy#3919 that actually repaired retention is preserved. Closes Dokploy#4051
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.
Summary
Restores the user-defined backup prefix as authoritative while preserving the retention-cleanup fix from #3919.
PR #3919 fixed a real bug in
keepLatestNBackups(issue #3855) wherepath.join()mangled rclone's:s3:bucketremote syntax, causing every scheduled run to delete all backups. Alongside that fix it bundled an unrelated structural change: prepending the auto-generatedappNameto every backup path (bucket/{appName}/{prefix}/...).That second change is what issue #4051 reports:
prefixis no longer authoritative —appNamealways sits in front of it.bucket/{prefix}/...are orphaned by the new retention logic.This PR keeps the actual retention fix from #3919 and removes the
appNameinsertion across all backup writers and the cleanup paths.After this change, paths are again: