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) I see in kubectl logs -f restore-job:
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!
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 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
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.