Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Different Retention for the Last Backup #810

Open
HelioCampos opened this issue Jan 20, 2025 · 1 comment
Open

Feature Request: Different Retention for the Last Backup #810

HelioCampos opened this issue Jan 20, 2025 · 1 comment

Comments

@HelioCampos
Copy link

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.

@spron-in
Copy link
Contributor

Hey @HelioCampos ,

I have hard time understanding the use cases and the idea behind it. Few things:

  1. Why can't you set retention of 6m for all your backups if there is a compliance need?

I would assume because of the storage consumption and/or time it takes to back smth up. Will incremental backups help here?

  1. If there is a need to store backups for longer period of time than existing retention, you can just take manual backups as a workaround. I would also suggest to store them in a different storage or bucket. Can this help?

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

No branches or pull requests

2 participants