Skip to content

fix(backup): Add the site name to streamed backup file names (backport #613) - #623

Merged
regdocs merged 1 commit into
masterfrom
mergify/bp/master/pr-613
Oct 8, 2026
Merged

regdocs merged 1 commit into
masterfrom
mergify/bp/master/pr-613

Conversation

@mergify

@mergify mergify Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

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 stream label:

  • Local FIFO: 20260929_101500-my_site_test-%stream%-database.sql.gz
  • S3 object: 20260929_101500-my_site_test-stream-database.sql.gz

The 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.gz would match a live FIFO, which blocks when opened.

Still working:

  • bypass_unlink.so matches %stream% anywhere in the path (strstr), so the FIFOs keep their protection.
  • The %stream%- → stream- swap for S3 keys and the pkill -f <timestamp> cleanup don't change.
  • Nothing in press parses these names.

🤖 Generated with Claude Code


This is an automatic backport of pull request #613 done by Mergify.

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)
@mergify mergify Bot assigned regdocs Oct 8, 2026
@mergify

mergify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
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.

@regdocs
regdocs merged commit d451221 into master Oct 8, 2026
4 of 5 checks passed
@regdocs
regdocs deleted the mergify/bp/master/pr-613 branch October 8, 2026 14:57
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