# MySQL Backup Error / Configuration Help

**URL:** <https://forums.percona.com/t/mysql-backup-error-configuration-help/25169>\
**Category:** PMM 2.x\
**Created:** [September 14, 2023, 7:06am UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169 "2023-09-14T07:06:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 14, 2023, 7:06am UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/1 "2023-09-14T07:06:21Z")

</div>

## Description:

I’m running the servers and clients in docker container, maybe this is a required information.  
Here: [Percona Monitoring and Management](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/mysql_prerequisites.html) is mentioned that the servers should be created with: `-e ENABLE_BACKUP_MANAGEMENT=1` is still required? The backup option is already available!

## Steps to Reproduce:

I setup an s3 compatible storage and tried to backup a MySQL Database and get this error:

software “mysqld” is not installed: incompatible service

MySQL is running the pmm user has BACKUP\_ADMIN as permission and the folder /var/lib/mysql should be accessible by the pmm client.

here is how I started my pmm-client container:

version: ‘3.3’  
services:  
pmm-client:  
container\_name: pmm-client  
network\_mode: host  
environment:  
- PMM\_AGENT\_SERVER\_ADDRESS=192.168.192.237  
- PMM\_AGENT\_SERVER\_USERNAME=admin  
- PMM\_AGENT\_SERVER\_PASSWORD=1149Testtest  
- PMM\_AGENT\_SERVER\_INSECURE\_TLS=1  
- PMM\_AGENT\_ID=/agent\_id/6dd9d703-5521-47d3-af25-2ded8b65bc53  
- PMM\_AGENT\_CONFIG\_FILE=config/pmm-agent.yaml  
restart: always  
image: ‘percona/pmm-client:2’  
volumes:  
- /var/lib/mysql:/var/lib/mysql

/var/lib/mysql is also configured with chmod

The documentation says that xtrabackup should be installed and that it should be included in the $path variable, what does that mean? Should xtrabackup be installed on the clients or / and on the pmm server?  
And I’m wondering about the $path variable, could someone help me?

Edit: It is working when I use the Client without Docker, so maybe the configuration isn’t the same. ENABLE\_BACKUP\_MANAGEMENT=1 doesn’t matter anymore I guess, it’s working without it.

Does anyone have an Idea?

## Version:

2.39

Thankks 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_Okoko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_okoko/32/5688_2.png) [@Michael\_Okoko](https://forums.percona.com/u/Michael_Okoko)\
**Post date:** [September 14, 2023, 2:36pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/2 "2023-09-14T14:36:37Z")

</div>

Hi, can you help share the output of running `mysqld --version` on the container where pmm-client is running?

> Should xtrabackup be installed on the clients or / and on the pmm server?

No actually, xtrabackup only needs to be installed in the same place as pmm-client. Here, $PATH means the value of the $PATH environment variable on the pmm-client side.

---

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 14, 2023, 2:45pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/3 "2023-09-14T14:45:55Z")

</div>

MySQL is not running within a container but directly on the system.  
The version is 8.0.34, and it’s running on a server with Ubuntu 22.04 LTS.

When the pmm-client is not running in a Docker container, database backups work.  
Xtrabackup is also installed directly on the system, which is probably why the client works without a container.

Another issue occurs during the restore process, often resulting in errors. It seems that the MySQL server is shutting down and restarting during the restore. Permissions are properly configured, but updates rarely work. Which logs should I check, and do you have any ideas?

---

<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:** [September 14, 2023, 2:54pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/4 "2023-09-14T14:54:04Z")

</div>

Hey @Marvin_Stelter,  
I’m confused on why you are running pmm-client inside a container? If mysql is running directly on the system, why did you bother with pmm-client inside a container? Why not just run pmm-client directly on the system, just like MySQL?

> [@Marvin\_Stelter](#):
>
> I’m running the servers and clients in docker container

> [@Marvin\_Stelter](#):
>
> MySQL is not running within a container but directly on the system.

You have conflicting statements here. First you say you are running the servers in docker container, but then you say you are running MySQL not in a container. Which is it? Please be clear and specific when you says “the servers”. Are you talking about MySQL server? or PMM Server?

---

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 14, 2023, 3:00pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/5 "2023-09-14T15:00:18Z")

</div>

I meant pmm and the clients, my mistake. Yeah you’re right the easier option is it to use it without docker.  
But this causes the issue that restoring backups isn’t really working, backups working fine.

---

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 14, 2023, 3:03pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/6 "2023-09-14T15:03:29Z")

</div>

Are the logs saved by PMM or Xtrabackup during the restore? MySQL doesn’t provide any specific errors; the server restarts when you initiate the restore. The Docker logs, where the PMM server is running, also don’t show any errors.

---

<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:** [September 14, 2023, 3:06pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/7 "2023-09-14T15:06:36Z")

</div>

> [@Marvin\_Stelter](#):
>
> But this causes the issue that restoring backups isn’t really working, backups working fine.

Can you confirm this by listing the contents of your S3 bucket?  
Yes, there should be some logs. Check the MySQL $datadir for xtrabackup or pmm related log files.

---

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 15, 2023, 10:21am UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/8 "2023-09-15T10:21:39Z")

</div>

![mysql_datadir](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/4/4a733ed4fa247e4e2f75042215128716ca181221.jpeg)

Percona says there was an error during the restore, but when I check the databases afterwards, it appears that everything has been restored - the files in $datadir were also all overwritten.

Here a screenshot of the s3 storage, looks also fine:

 ![pmm_s3](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/f946a9fed40cffd12ca540cc677619b748792810.jpeg)

The error log contains this here :

2023-09-15T10:10:36.559481Z 0 [System] [MY-010229] [Server] Starting XA crash recovery…  
2023-09-15T10:10:36.592740Z 0 [System] [MY-010232] [Server] XA crash recovery finished.

This is the only error in the Log file, I cleaned it before start the restoring process.

---

<div class="post-metadata">

**Author:** ![artem\_gavrilov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/artem_gavrilov/32/1453_2.png) [@artem\_gavrilov](https://forums.percona.com/u/artem_gavrilov)\
**Post date:** [September 15, 2023, 1:42pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/9 "2023-09-15T13:42:33Z")

</div>

Please check also pmm-client logs for errors and pmm-server logs (more specific pmm-managed log file `/srv/logs/pmm-managed.log` located inside pmm server container).  
All components (pmm-client, xtrabackp) should be installed on the same host as mysql instance (not in docker).

P.S. also please take a note that MySQL backups feature is in tech preview state and not recommended for use in production.

---

<div class="post-metadata">

**Author:** ![Marvin\_Stelter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marvin_stelter/32/11330_2.png) [@Marvin\_Stelter](https://forums.percona.com/u/Marvin_Stelter)\
**Post date:** [September 20, 2023, 1:06pm UTC](https://forums.percona.com/t/mysql-backup-error-configuration-help/25169/10 "2023-09-20T13:06:42Z")

</div>

now it works, the version of xtrabackup wasn’t compatible with the mysql server
