MySQL Backup Error / Configuration Help


I’m running the servers and clients in docker container, maybe this is a required information.
Here: MySQL backup prerequisites - Percona Monitoring and Management 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’
container_name: pmm-client
network_mode: host
- 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’
- /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?



Thankks :slight_smile:

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.

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?

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?

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?

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.

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.

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.

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:

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.

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.

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

1 Like