Skip to content

Feature Request: Different Retention for the Last Backup #810

@HelioCampos

Description

@HelioCampos

Proposal

Feature Request: Different Retention for the Last Backup

Description:

I would like to request a feature to support different retention periods for the lastest backup in the Percona Operator backup management system. Specifically, the ability to retain the lastest backup for a longer period (e.g., 6 months) while allowing the other old backups to follow the standard retention policy (e.g., 31 days).

Proposed Solution:

  • New Retention Policy Type: Introduce a new retention policy type or flag for the last backup, which can be set to a custom retention duration (e.g., 6 months).
  • Dynamic Retention Adjustment: When a new backup is created, the retention policy for the previous lastest backup should be automatically adjusted to a shorter period (e.g., 31 days).

This could be configured as part of the Percona Operator’s backup settings under spec.backup.retentionPolicy.

Example configuration:

spec:
  backup:
    lastestBackupRetentionPolicy:
      type: "last_backup"
      value: "6m"  # Keep the last backup for 6 months
    retentionPolicy:
      type: "time"
      value: "31d"  # Keep other backups for 31 days

Use-Case

Currently, the Percona Operator allows setting a single retention policy for all backups. However, in some scenarios, it’s beneficial to have a longer retention period for the most recent backup, ensuring it's kept for a specific time frame (e.g., 6 months) before it’s purged. Once a new backup is created, the retention period for the last backup would automatically change to a shorter duration (e.g., 31 days), and the cycle would continue.

This feature would be helpful in the following cases:

  1. Legal or Compliance Requirements: Certain backups may need to be retained for a specific period (e.g., 6 months) for compliance purposes.
  2. Business Continuity: It’s important to retain the most recent backup for a longer time, ensuring that it’s available for recovery in case of a failure or other issues.

Is this a feature you are interested in implementing yourself?

No

Anything else?

Benefits:

  • Provides more flexibility for backup retention, supporting both long-term and short-term retention needs.
  • Helps with compliance and business continuity without manually managing backups.
  • Automates retention of backups in a way that adapts to changing backup cycles.

Additional Information:

  • The retention policy for the last backup should automatically adjust when a new backup is created.
  • This feature could be optional and should not break existing behavior for users who prefer a uniform retention policy.

Impact:

This feature would provide enhanced flexibility to backup management, making it easier to adhere to different organizational or regulatory requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions