# Restore dump to XtraDB Cluster from mysql

**URL:** <https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606>\
**Category:** Percona Operator for MySQL\
**Created:** [July 8, 2025, 10:22pm UTC](https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606 "2025-07-08T22:22:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siamion\_Davydau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/siamion_davydau/32/19441_2.png) [@Siamion\_Davydau](https://forums.percona.com/u/Siamion_Davydau)\
**Post date:** [July 8, 2025, 10:22pm UTC](https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606/1 "2025-07-08T22:22:45Z")

</div>

Hello!  
I’m trying to restore dump via xtrabackup from a mysql 5.7 on dedicated server to Percona XtraDB Cluster 5.7.44 running in kubernetes (Percona Operator for MySQL v1.17.0).  
After run `kubectl apply -f deploy/backup/restore.yaml` (based on [git example](https://github.com/percona/percona-xtradb-cluster-operator/blob/v1.17.0/deploy/backup/restore.yaml)) I see in `kubectl logs -f restore-job`:

```auto
250708 21:57:31 [01] ...done
250708 21:57:31 completed OK!

```

but pod mysql-pxc-cluster-pxc-0 have some errors:  
`[2025-07-08 21:58:16] (mysql-pxc-cluster-pxc-0 pxc) 2025-07-08T21:58:16.003936Z 0 [Note] WSREP: Fail to access the file (/var/lib/mysql//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first first time or re-booting after a graceful shutdown`  
`[2025-07-08 21:58:16] (mysql-pxc-cluster-pxc-0 pxc) 2025-07-08T21:58:16.003948Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown`

Init script looking for Galera state files (`gvwstate.dat`, `grastate.dat`) to determine if it should join/bootstrap a cluster. Since it doesn’t find them, it defaults to a clean initialization.

Can I start cluster pod without truncate dump data?

Any guidance would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [July 10, 2025, 11:17am UTC](https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606/2 "2025-07-10T11:17:19Z")

</div>

Hello @Siamion_Davydau and welcome to Percona Community.

So, since you’re importing backup of standard mysql to galera, the backup will not have grastate. I think you have figured it out and identified that because of this the cluster is not bootstrapping.

**Warning: This comment is coming from older version of operator and isn’t relevant. Next comment from Matthew looks better.**

xxxxxxxxxxxxxxxxxxxxxxxxxxx  
Usually outside containers, we do wsrep\_new\_cluster or similar to bootstarp the cluster. I decided to look into [documentation](https://docs.percona.com/legacy-documentation/percona-operator-for-mysql-pxc/percona-kubernetes-operator-for-pxc-1.4.0.pdf) if we can force something like that.  
I read about:  
`forceUnsafeBootstrap: true`

> The setting can be reset in case of a sudden crash when all nodes may be considered unsafe  
> to bootstrap from. The setting lets a node be selected and set to safe\_to\_bootstrap and  
> provides data recovery

I believe you should try setting this option in the yaml file and give it a go. Let me know.  
xxxxxxxxxxxxxxxxxxxxxxxxxxx  
Thanks,  
K

---

<div class="post-metadata">

**Author:** ![Siamion\_Davydau](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/siamion_davydau/32/19441_2.png) [@Siamion\_Davydau](https://forums.percona.com/u/Siamion_Davydau)\
**Post date:** [July 10, 2025, 12:36pm UTC](https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606/3 "2025-07-10T12:36:44Z")

</div>

Hello, @kedarpercona!  
Thank you very much for your detailed and accurate response!  
However, after checking the `PerconaXtraDBCluster` Custom Resource Definition (CRD) for the operator version **v1.17.0** (which I am currently using), I found that the `forceUnsafeBootstrap` field does not seem to be present or supported in this specific version’s CRD.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 10, 2025, 11:16pm UTC](https://forums.percona.com/t/restore-dump-to-xtradb-cluster-from-mysql/38606/4 "2025-07-10T23:16:46Z")

</div>

> [@Siamion\_Davydau](#):
>
> grastate.dat

I would create a dummy grastate.dat file and put that into your restore’d backup:

```auto
# GALERA saved state
version: 2.1
uuid: 5981f182-a4cc-11e6-98cc-77fabedd360d
seqno: 1
safe_to_bootstrap: 1

```
