I am trying to restore backup to a new percona XtradDB MYSQL cluster but not able to restore it.
Steps taken:-
- I have created a MYSQL Cluster using Percona Operator 1.14.0 and percona xtradb cluster 8.X and scheduled a backup to S3 and also enabled PITR to same S3 bucket.
pxc.yaml
apiVersion: pxc.percona.com/v1
kind: PerconaXtraDBCluster
metadata:
name: mysql
namespace: mysql
finalizers:- delete-pxc-pods-in-order
spec:
crVersion: 1.14.0
allowUnsafeConfigurations: false
updateStrategy: SmartUpdate
upgradeOptions:
versionServiceEndpoint: https://check.percona.com
apply: disabled
schedule: “0 4 * * *”
pxc:
size: 3
image: percona/percona-xtradb-cluster:8.0.35-27.1
autoRecovery: true
resources:
requests:
memory: 1G
cpu: 600m
affinity:
antiAffinityTopologyKey: “kubernetes.io/hostname”
advanced:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.sh/nodepool
operator: In
values:
- data-amd
tolerations: - key: “data”
operator: “Equal”
value: “true”
effect: “NoSchedule”
podDisruptionBudget:
maxUnavailable: 1
volumeSpec:
persistentVolumeClaim:
storageClassName: ebs-sc
accessModes: [ “ReadWriteOnce” ]
resources:
requests:
storage: 6G
gracePeriod: 600
haproxy:
enabled: false
size: 3
image: percona/percona-xtradb-cluster-operator:1.14.0-haproxy
resources:
requests:
memory: 1G
cpu: 600m
affinity:
antiAffinityTopologyKey: “kubernetes.io/hostname”
podDisruptionBudget:
maxUnavailable: 1
gracePeriod: 30
proxysql:
enabled: true
size: 3
image: percona/percona-xtradb-cluster-operator:1.14.0-proxysql
resources:
requests:
memory: 1G
cpu: 600m
affinity:
antiAffinityTopologyKey: none
advanced:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.sh/nodepool
operator: In
values:
- data-amd
tolerations: - key: “data”
operator: “Equal”
value: “true”
effect: “NoSchedule”
volumeSpec:
persistentVolumeClaim:
storageClassName: ebs-sc
accessModes: [ “ReadWriteOnce” ]
resources:
requests:
storage: 2G
podDisruptionBudget:
maxUnavailable: 1
gracePeriod: 30
logcollector:
enabled: true
image: percona/percona-xtradb-cluster-operator:1.14.0-logcollector
resources:
requests:
memory: 100M
cpu: 200m
pmm:
enabled: false
image: percona/pmm-client:2.41.1
serverHost: monitoring-service
resources:
requests:
memory: 150M
cpu: 300m
backup:
image: percona/percona-xtradb-cluster-operator:1.14.0-pxc8.0-backup-pxb8.0.35
serviceAccountName: mysql-sa
pitr:
enabled: true
storageName: s3-ap-south-1
timeBetweenUploads: 120
timeoutSeconds: 60
storages:
s3-ap-south-1:
type: s3
verifyTLS: true
resources:
requests:
memory: 1G
cpu: 600m
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: karpenter.sh/nodepool
operator: In
values:
- data-amd
tolerations:
- key: “data”
operator: “Equal”
value: “true”
effect: “NoSchedule”
annotations:
testName: scheduled-backup
labels:
backupWorker: ‘True’
s3:
bucket: eks-cluster-cybertron-mysql-backup
credentialsSecret: mysql-backup-s3-secrets
region: ap-south-1
schedule:- name: “hourly-backup”
schedule: “0 0/1 * * *”
keep: 5
storageName: s3-ap-south-1
- name: “hourly-backup”
- delete-pxc-pods-in-order
- The I created a new cluster with new name (mysql-restore) and similar config as above and tried to restore the backup
restore.yaml =>
apiVersion: pxc.percona.com/v1
kind: PerconaXtraDBClusterRestore
metadata:
name: mysql-restore
namespace: mysql
annotations:
percona.com/unsafe-pitr: “true”
spec:
pxcCluster: mysql-restore1
resources:
requests:
memory: 100M
cpu: 100m
limits:
memory: 200M
cpu: 200m
backupSource:
verifyTLS: true
destination: cron-mysql-fs-pvc-20248416039-1dsil
s3:
bucket: eks-cluster-polaris-mysql-backup
credentialsSecret: mysql-backup-s3-secrets
endpointUrl: https://s3.ap-south-1.amazonaws.com/
region: ap-south-1
Getting success status on ‘k get perconaxtradbclusterrestores.pxc.percona.com’ but not getting the data restored in new cluster