# Test restoring backups

**URL:** <https://forums.percona.com/t/test-restoring-backups/37268>\
**Category:** Percona Operator for MySQL\
**Created:** [March 19, 2025, 12:16pm UTC](https://forums.percona.com/t/test-restoring-backups/37268 "2025-03-19T12:16:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew2](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew2/32/4044_2.png) [@Andrew2](https://forums.percona.com/u/Andrew2)\
**Post date:** [March 19, 2025, 12:16pm UTC](https://forums.percona.com/t/test-restoring-backups/37268/1 "2025-03-19T12:16:03Z")

</div>

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](https://docs.percona.com/percona-operator-for-mysql/ps/backups-restore.html)

Is this genuinely the case, or can we create a new cluster with the same name, config and S3 parameters and restore that way?

---

<div class="post-metadata">

**Author:** ![anil.joshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/anil.joshi/32/13100_2.png) [@anil.joshi](https://forums.percona.com/u/anil.joshi)\
**Post date:** [April 22, 2025, 5:38pm UTC](https://forums.percona.com/t/test-restoring-backups/37268/2 "2025-04-22T17:38:04Z")

</div>

@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](https://docs.percona.com/percona-operator-for-mysql/ps/backups-restore.html)_

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**

```auto
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:_
