For various regulatory and compliance requirements, we need to demonstrate that we’ve tested our backups. Looking at the documentation for Operator, it appears that restores need to be done on the same cluster from which the backup was taken: i.e :
kubectl get ps-backup
“Obviously, you can make this check only on the same cluster on which you have previously made the backup.”
Restore from a previously saved backup - Percona Operator for MySQL
Is this genuinely the case, or can we create a new cluster with the same name, config and S3 parameters and restore that way?
@Andrew2 I think you misinterpret the manual . Indeed you can restore the backups on both existing and new cluster.
> Backup can be restored not only on the Kubernetes cluster where it was made, but also on any Kubernetes-based environment with the installed Operator.
> Restore from a previously saved backup - Percona Operator for MySQL
Basically, you can configure the backup to be kept in any S3/remote and there on the new cluster restore the backup from the S3/Bucket .
For example:
restore.yaml
apiVersion: ps.percona.com/v1alpha1
kind: PerconaServerMySQLRestore
metadata:
name: restore1
spec:
clusterName: cluster1
backupName: backup1
backupSource:
destination: s3://S3-BACKUP-BUCKET-NAME-HERE/backup-path
storage:
s3:
bucket: S3-BACKUP-BUCKET-NAME-HERE
credentialsSecret: cluster1-s3-credentials
region: us-west-2
type: s3
kubectl apply -f restore.yaml
Rest, you can refer to the manual and test the steps.
Please also note:-
> if you are restoring backup on the Kubernetes-based cluster different from one you have used to save this backup, set spec.backupSource
subsection instead of spec.backupName
field to point on the appropriate cloud storage: