MySQL backup prerequisites¶
Before creating MySQL backups:
-
Enable Backup Management and confirm the Backup option is available on the side menu. If Backup Management is disabled, go to Configuration > Settings > Advanced settings, enable Backup Management, and click Apply changes.
Important
If PMM Server runs as a Docker container, enable backup features at container creation time by adding
-e ENABLE_BACKUP_MANAGEMENT=1to yourdocker runcommand. -
Install and run the PMM Client on the node.
-
To enable XtraBackup for MySQL 8.0+, connect
pmm-agentto MySQL using a user with theBACKUP_ADMINprivilege. -
Run only one MySQL instance on the node.
-
Verify that MySQL is running:
- as a service via
systemd - with the name
mysqlormysqld(runsystemctl status mysqlorsystemctl status mysqldto confirm) - from a
mysqlsystem user account
- as a service via
-
Verify that a
mysqlsystem group exists. -
Verify that MySQL uses
/var/lib/mysqlfor database storage. -
Grant
pmm-agentread/write permissions to/var/lib/mysql. -
Install the latest versions of the following packages and add them to
$PATH. For XtraBackup version requirements, see XtraBackup and MySQL version compatibility:xtrabackup(includesxbcloudandxbstream)- [
qpress][PERCONA_QPRESS]
XtraBackup and MySQL version compatibility¶
When installing xtrabackup, use a version of Percona XtraBackup (PXB) that matches your MySQL version:
- MySQL 5.5, 5.6, 5.7 — PXB 2.4.x
- MySQL 8.0.0–8.0.33 — PXB 8.0.x (same version or newer)
- MySQL 8.0.34+ — PXB 8.0.34+
- MySQL 8.1.x, 8.2.x, 8.3.x — matching PXB version (supports only the matching MySQL Innovation release)
- MySQL 8.4.x — any PXB 8.4.x release (supports MySQL 8.4 LTS, including future patch releases; does not support MySQL 8.0 or 9.x)