# I am trying to restore my backup and facing some issue

**URL:** <https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797>\
**Category:** Percona Distribution for MySQL\
**Tags:** mysql\
**Created:** [April 23, 2024, 7:13am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797 "2024-04-23T07:13:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 23, 2024, 7:13am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/1 "2024-04-23T07:13:42Z")

</div>

When I am trying to do backup and restore procedure through perconaxtradbclusterrestore i am getting some error (attached).

 ![Screenshot 2024-04-23 at 12.34.06 PM](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/2/d/2d57befe209700a60b15589067f54be46f31d1c5.jpeg)

---

<div class="post-metadata">

**Author:** ![lalit.choudhary](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lalit.choudhary/32/51_2.png) [@lalit.choudhary](https://forums.percona.com/u/lalit.choudhary)\
**Post date:** [April 23, 2024, 9:26am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/2 "2024-04-23T09:26:00Z")

</div>

Hello @Aditya1523

Error look similar to [Xtrabackup fails with errors on check point file](https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247)

You should check below points,

- Check the backup log for any warnings or errors.
- Check backup directory permission and if you have/are able to access the `xtrabackup_checkpoints` file.

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 23, 2024, 9:47am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/3 "2024-04-23T09:47:48Z")

</div>

Hi lalit,  
I am trying to restore my data from s3 backup (cloudflare) where i have a bucket name `mysql-backup-dev` and there are three things backed up: pxccluster-2024-04-22-02:00:41-full.sst\_info/  
pxccluster-2024-04-22-02:00:41-full/  
[pxccluster-2024-02-09-02:00:53-full.md5], and I have taken the resource destination as `pxccluster-2024-04-22-02:00:41-full`

yaml file for restoration:

apiVersion: [pxc.percona.com/v1](http://pxc.percona.com/v1)  
kind: PerconaXtraDBClusterRestore  
metadata:  
name: restore1  
spec:  
pxcCluster: pxc-cluster  
backupSource:  
destination: s3://mysql-backup-dev/pxccluster-2024-04-21-02:00:30-full  
s3:  
bucket: mysql-backup-dev  
credentialsSecret: s3-backup-secret  
region: Asia-Pacific  
endpointUrl: [https://4b924987231b504ca149.r5.cloudflarestorage.com](https://4b924987231b504ca149.r5.cloudflarestorage.com)  
After doing perconaxtradbclusterrestore pods are going into shut down state and never coming nac

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 23, 2024, 11:38am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/4 "2024-04-23T11:38:02Z")

</div>

@lalit.choudhary Can you help me on this I am stuck,  
Thanks.

---

<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:** [April 23, 2024, 12:36pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/5 "2024-04-23T12:36:01Z")

</div>

@Aditya1523,  
The error log says “xbcloud: Probe failed. Please check your credentials and endpoint settings” It looks like your configuration is not correct.

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 24, 2024, 6:57am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/6 "2024-04-24T06:57:34Z")

</div>

Hi Matthew, Is there any way to connect with you on Zoom or anything so that I can debug this issue, as per my knowledge the secrets I used are correct.

---

<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:** [April 24, 2024, 1:59pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/7 "2024-04-24T13:59:14Z")

</div>

Hello @Aditya1523,  
You would need to engage with a [support contract](https://percona.com/support) in order to connect on Zoom.

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 25, 2024, 5:40am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/8 "2024-04-25T05:40:07Z")

</div>

I am using the correct credentials for secrets for s3, and I am providing my YAML file can you tell me where I am wrong I have tried everything to correct my YAML, but no luck, Location:Western Europe (WEUR) so I provided in **region** :eu-west-1

apiVersion: v1  
kind: Secret  
metadata:  
name: s3-backup-secrets  
namespace: pxc  
immutable: false  
stringData:  
AWS\_ACCESS\_KEY\_ID: HJNFJRyMjljNmZiNmQ1R  
AWS\_SECRET\_ACCESS\_KEY: HFNJFNJNFJ2YzkwZGU0MGMGRjMTMxYzVmMjg4YjFlYmNhNTdkYjMHFNJFNJDN

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 25, 2024, 6:18am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/9 "2024-04-25T06:18:35Z")

</div>

![Screenshot 2024-04-25 at 11.44.51 AM.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/2/6/26ccaecf6f5d1c7f6d256fccbdba17f0ef5704eb.png)

I can restore the backup but after running for some time getting an error Cannot write to the standard output.

---

<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:** [April 25, 2024, 2:15pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/10 "2024-04-25T14:15:52Z")

</div>

@Aditya1523,  
We will need to see the complete log output.

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 26, 2024, 11:43am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/11 "2024-04-26T11:43:52Z")

</div>

Hi, the previous issue was resolved that happened because of insufficient disk space, and i have completed the restoration process successfully, BUT after the restoration its giving me error pod is not able to start and showing the below error:

```auto
Liveness probe failed: ERROR 1045 (28000): Access denied for user 'monitor'@'pxc-cluster-pxc-0.pxc-cluster-pxc.pxc.svc.cluster.local' (using password: YES) + [[-n '']] + exit 1

```

---

<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:** [April 26, 2024, 6:02pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/12 "2024-04-26T18:02:19Z")

</div>

Please create a monitoring user for the probes to function:

```
CREATE USER monitor@'%' IDENTIFIED BY 'password';

```

You can find the password for the monitor user in the K8S secrets file

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 27, 2024, 8:19am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/13 "2024-04-27T08:19:03Z")

</div>

This i need to create before restore right? because after restore I am not able to login into mysql to run this command.

```auto
bash-4.4$ mysql -h pxc-cluster-pxc.pxc.svc.cluster.local -P 3306 -u root -p
Enter password: 
ERROR 2005 (HY000): Unknown MySQL server host 'pxc-cluster-pxc.pxc.svc.cluster.local' (-2)
bash-4.4$ 

```

---

<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:** [April 27, 2024, 12:21pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/14 "2024-04-27T12:21:57Z")

</div>

No, create after restore. If you created before restore, then the restore would erase the user.

`kubectl get svc` to find the correct endpoint for your cluster.

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 28, 2024, 5:44pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/15 "2024-04-28T17:44:38Z")

</div>

Hi matthewb, how can i create after restore it is giving me an error in login so i am not able to get inside the mysql so that i can run CREATE USER monitor@‘%’ IDENTIFIED BY ‘password’; this command.

 ![Screenshot 2024-04-28 at 11.12.42 PM](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/9/d/9dadeda40eb3d4e3d070faeb8e913939e907d00f.png)

---

<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:** [April 29, 2024, 4:48am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/16 "2024-04-29T04:48:37Z")

</div>

You’re using the wrong hostname. Determine what the correct hostname is for your PXC install. Did you run the command I suggested above?

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 29, 2024, 5:29am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/17 "2024-04-29T05:29:43Z")

</div>

Yes I used the command and I am sure the hostname is correct because before restore I used the same hostname and it was working fine but after restore its showing unknown server host.  
And In the screenshot cluster IP is showing none but In my running integration cluster the cluster -IP is also showing none which i think normal behaviour.  
What i suspect is when the pxc cluster is created after restoration it is done by operator and it is causing the issue.

 ![Screenshot 2024-04-29 at 10.56.26 AM](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/a/5/a5007a857ea6f04786deac6129f250ed37fba51e.png)

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 29, 2024, 7:47am UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/19 "2024-04-29T07:47:01Z")

</div>

I can see before restore procedure the endpoint of services are present but after restore the endpoint of service is showing null, thats why it is not able to detect the service or host.  
Note: Before restore I am able to execute the same host and login but after it is not allowed.

 ![Screenshot 2024-04-29 at 1.16.46 PM](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/f/6/f6324d4f0191dd71db8c66cd455fb472344e6aa0.png)

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 29, 2024, 12:43pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/20 "2024-04-29T12:43:03Z")

</div>

Hi matthewb any update?

---

<div class="post-metadata">

**Author:** ![Aditya1523](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aditya1523/32/20039_2.png) [@Aditya1523](https://forums.percona.com/u/Aditya1523)\
**Post date:** [April 29, 2024, 9:17pm UTC](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797/21 "2024-04-29T21:17:41Z")

</div>

Hi, after restoration I am not able to login to database because i think the permission for /var/lib/mysql is not mysql I used cmd `chown -R mysql:mysql /var/lib/mysql ` but its giving me error

```auto
chown: changing ownership of 'mysql/pxc-entrypoint.sh': Operation not permitted
chown: changing ownership of 'mysql/unsafe-bootstrap.sh': Operation not permitted
chown: changing ownership of 'mysql/pxc-configure-pxc.sh': Operation not permitted
chown: changing ownership of 'mysql/liveness-check.sh': Operation not permitted
chown: changing ownership of 'mysql/readiness-check.sh': Operation not permitted
chown: changing ownership of 'mysql/peer-list': Operation not permitted
chown: changing ownership of 'mysql/get-pxc-state': Operation not permitted
chown: changing ownership of 'mysql': Operation not permitted

```

I can not use sudo because I am inside pod and sudo is not installed can you suggest any docs or how to proceed further.

[Next page](https://forums.percona.com/t/i-am-trying-to-restore-my-backup-and-facing-some-issue/29797.md?page=2)
