Skip to content

feat: Add configurable backup filename format#1668

Open
giuliocalzo wants to merge 1 commit into
mariadb-operator:mainfrom
giuliocalzo:feature/backup-filename-format
Open

feat: Add configurable backup filename format#1668
giuliocalzo wants to merge 1 commit into
mariadb-operator:mainfrom
giuliocalzo:feature/backup-filename-format

Conversation

@giuliocalzo
Copy link
Copy Markdown

Summary

  • Add two new optional fields to BackupSpec: fileNamePrefix (default: "backup") and timestampFormat (enum: iso8601|compact, default: iso8601)
  • Allows users to customize backup filenames, e.g. mydb.20231218161400.sql.gz instead of the hardcoded backup.2023-12-18T16:14:00Z.sql.gz
  • Passes the new settings through the full chain: API types -> builder -> backup command -> backup binary -> processor

Test plan

  • Existing processor tests pass (no regressions)
  • New tests for custom prefix validation (TestLogicalCustomPrefixIsValidBackupFile)
  • New tests for compact timestamp validation (TestLogicalCompactTimestampIsValidBackupFile)
  • New tests for combined prefix + compact target file selection (TestLogicalCustomPrefixAndCompactGetTargetFile)
  • New tests for combined prefix + compact retention cleanup (TestLogicalCustomPrefixAndCompactGetOldBackupFiles)
  • make code and make manifests run cleanly
  • Full project compiles with go build ./...
  • E2E: deploy operator, create Backup with custom fileNamePrefix/timestampFormat, verify filenames match

Allow users to customize backup filenames via two new optional fields
in BackupSpec: fileNamePrefix (default: "backup") and timestampFormat
(enum: iso8601|compact, default: iso8601).

This enables filenames like "mydb.20231218161400.sql.gz" instead of
the hardcoded "backup.2023-12-18T16:14:00Z.sql.gz".
@giuliocalzo giuliocalzo changed the title Add configurable backup filename format feat: Add configurable backup filename format Mar 16, 2026
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