Repository navigation
fix(backup): Add the site name to streamed backup file names (backport #613) - #623
Merged
Merged
Conversation
Streamed backups were named `<timestamp>-stream-<type>`, so the S3 objects and the files downloaded from them didn't say which site they belong to, unlike regular backups. Use frappe's site slug, as regular backups do. The slug goes before the `%stream%` marker: frappe's recent-backup glob `*-<slug>-database.sql.gz` would otherwise match a live FIFO. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit b1a1055)
Contributor
Author
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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.
Streamed backups were named
<timestamp>-%stream%-<type>locally and<timestamp>-stream-<type>in S3, so, unlike regular backups, nothing in the object or downloaded file name said which site it belongs to.This adds frappe's site slug (the site name with dots turned into underscores, as regular backups use), keeping the
streamlabel:20260929_101500-my_site_test-%stream%-database.sql.gz20260929_101500-my_site_test-stream-database.sql.gzThe slug goes before the
%stream%marker on purpose. Frappe finds recent backups with the glob*-<slug>-database.sql.gz, and a name ending in-<slug>-database.sql.gzwould match a live FIFO, which blocks when opened.Still working:
bypass_unlink.somatches%stream%anywhere in the path (strstr), so the FIFOs keep their protection.%stream%-→stream-swap for S3 keys and thepkill -f <timestamp>cleanup don't change.🤖 Generated with Claude Code
This is an automatic backport of pull request #613 done by Mergify.