MySQL backup prerequisites¶
Before creating MySQL backups, make sure to:
-
Check that Backup Management is enabled and the Backup option is available on the side menu. If Backup Management has been disabled on your instance, go to Configuration > Settings > Advanced settings, re-enable Backup Management then click Apply changes. !!! caution alert alert-warning “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. -
Check that the PMM Client is installed and running on the node.
-
To enable Xtrabackup for MySQL 8.0+, check that pmm-agent connects to MySQL with a user that has BACKUP_ADMIN privilege.
-
Check that there is only one MySQL instance running on the node.
-
Verify that MySQL is running:
-
as a service via
systemd; -
with the name
mysqlormysqld(to confirm, usesystemctl status mysqlorsystemctl status mysqldrespectively); -
from a
mysqlsystem user account.
-
-
Make sure that there is a
mysqlsystem group. -
Check that MySQL is using the
/var/lib/mysqldirectory for database storage. -
Make sure that
pmm-agenthas read/write permissions to the/var/lib/mysqldirectory. -
Check that the latest versions of the following packages are installed and included in the
$PATHenvironment variable:-
xtrabackup, which includes: -
[
qpress][PERCONA_QPRESS].
-
Important
The versions of each must be compatible with the installed version of MySQL. Use the Percona XtraBackup version family that matches your MySQL version:
| MySQL version | Percona XtraBackup version |
|---|---|
| MySQL 5.5, 5.6, or 5.7 | Percona XtraBackup 2.4.x |
| MySQL 8.0.0 through 8.0.21 | Percona XtraBackup 8.0.x, using the minimum version required for your MySQL release |
| MySQL 8.0.22 through 8.0.33 | Percona XtraBackup 8.0.x with the same or newer core version |
| MySQL 8.0.34 and newer 8.0 releases | Percona XtraBackup 8.0.34 or newer 8.0.x |
| MySQL 8.1.x | Percona XtraBackup 8.1.x |
| MySQL 8.2.x | Percona XtraBackup 8.2.x |
| MySQL 8.3.x | Percona XtraBackup 8.3.x |
| MySQL 8.4.x | Any Percona XtraBackup 8.4.x release |
Percona XtraBackup 8.4.x supports MySQL 8.4 LTS releases, including future 8.4 patch releases. It does not support backing up MySQL 8.0 or 9.x servers. Percona XtraBackup 8.1.x, 8.2.x, and 8.3.x support only the matching MySQL Innovation release series.