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

[BUG] Update cluster retentionPeriod without change PITR backup retention" #8296

Closed
fengluodb opened this issue Oct 18, 2024 · 0 comments · Fixed by #8297
Closed

[BUG] Update cluster retentionPeriod without change PITR backup retention" #8296

fengluodb opened this issue Oct 18, 2024 · 0 comments · Fixed by #8297
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@fengluodb
Copy link
Contributor

Updating cluster retentionPeriod should also change PITR backup retention in backup schedule.

When updating cluster retentionPeriod, PITR backup retention should be adjusted accordingly in the backup schedule. This alignment is crucial to prevent scenarios where continuous backups have shorter retention periods than full backups, which could compromise the ability to restore to any point in time.

apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
  creationTimestamp: "2024-10-17T02:01:12Z"
  finalizers:
  - cluster.kubeblocks.io/finalizer
  name: azoll-7558fdb4
  namespace: kubeblocks-cloud-ns
spec:
  backup:
    cronExpression: 0 18 * * *
    enabled: true
    method: xtrabackup
    pitrEnabled: true
    repoName: storage-minio
    retentionPeriod: 10d
  clusterDefinitionRef: apecloud-mysql
  clusterVersionRef: ac-mysql-8.0.30-1
  componentSpecs:
  - componentDefRef: mysql
    disableExporter: true
    enabledLogs:
    - slow
    - error
    name: mysql
    replicas: 1
    resources:
      limits:
        cpu: "1"
        memory: 1Gi
      requests:
        cpu: 100m
        memory: 102Mi
    volumeClaimTemplates:
    - name: data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
        storageClassName: ape-local-hostpath-sc
  terminationPolicy: Delete
apiVersion: dataprotection.kubeblocks.io/v1alpha1
kind: BackupSchedule
metadata:
  annotations:
    apps.kubeblocks.io/backup-policy-template: apecloud-mysql-backup-policy-template
    dataprotection.kubeblocks.io/is-default-policy: "true"
    kubeblocks.io/reconcile: "435821487"
  creationTimestamp: "2024-10-17T02:01:12Z"
  finalizers:
  - cluster.kubeblocks.io/finalizer
  - dataprotection.kubeblocks.io/finalizer
  generation: 3
  namespace: kubeblocks-cloud-ns
  ownerReferences:
  - apiVersion: apps.kubeblocks.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: Cluster
    name: azoll-7558fdb4
    uid: 44e79f6b-8c01-4900-9516-624f723e7cf4
  resourceVersion: "435821496"
  uid: 3fdaf9a1-723f-4cd5-90f1-afab46ba0752
spec:
  backupPolicyName: azoll-7558fdb4-mysql-backup-policy
  schedules:
  - backupMethod: xtrabackup
    cronExpression: 0 18 * * *
    enabled: true
    retentionPeriod: 10d
  - backupMethod: volume-snapshot
    cronExpression: 0 18 * * *
    enabled: false
    retentionPeriod: 7d
  - backupMethod: archive-binlog
    cronExpression: '*/30 * * * *'
    enabled: true
    retentionPeriod: 8d
@fengluodb fengluodb added the kind/bug Something isn't working label Oct 18, 2024
@fengluodb fengluodb self-assigned this Oct 18, 2024
@shanshanying shanshanying added this to the Release 0.9.2 milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants