MySQL Enterprise Backup (MEB) Lifecycle
Installation
MySQL Enterprise Backup 8.0.21 only supports MySQL 8.0.21.
For earlier verions of MySQL 8.0, use the MySQL Enterprise Backup version with the same version number as the server.
For MySQL 5.7, use MySQL Enterprise Backup 4.1.
For MySQL 5.6, use MySQL Enterprise Backup 3.12.
Download
Download installation files from Oracle e-delivery...
Select Product Pack -> MySQL
DatabaseSystem -> Linux x86_64
Download MySQL Enterprise Backup {version} RPM for Oracle Linux / RHEL 6 x86 (64bit)
V1006237-01.zip - MySQL Enterprise Backup 8.0.23 TAR for Oracle Linux / RHEL 7 x86 (64bit), 50.6 MBV1008500-01.zip - MySQL Enterprise Backup 8.0.24 TAR for Oracle Linux / RHEL 7 x86 (64bit), 35.5 MBV1018027-01.zip - MySQL Enterprise Backup 8.0.27 TAR for Generic Linux x86 (64bit), 67.5MB
Install (Linux)
Unpack meb-{version}-el6-x86-64bit.tar.gz to /mysql/mysql-backup
cd /mysql
unzip ${ZIPFILE}
tar xvf ${TARFILE}
ln -s /mysql/$(echo ${TARFILE} | awk -F".tar" '{ print $1 }') /mysql/mysql-backup
mv README.txt /mysql/mysql-backup
rm -f ${TARFILE} ${TARFILE}.asc ${TARFILE}.md5 ${ZIPFILE}
export PATH=/mysql/mysql-backup/bin:$PATH
Add this to the .bash_profile for the root user
vi /root/.bash_profile
Add backup user to MySQL
For MySQL < 8.0
CREATE USER 'backup'@'myserver';
GRANT RELOAD ON *.* TO 'backup'@'myserver';
GRANT CREATE, INSERT, DROP, UPDATE ON mysql.ibbackup_binlog_marker TO 'backup'@'myserver';
GRANT CREATE, INSERT, DROP, UPDATE ON mysql.backup_progress TO 'backup'@'myserver';
GRANT CREATE, INSERT, SELECT, DROP, UPDATE ON mysql.backup_history TO 'backup'@'myserver';
GRANT REPLICATION CLIENT ON *.* TO 'backup'@'myserver';
GRANT SUPER ON *.* TO 'backup'@'myserver';
GRANT CREATE TEMPORARY TABLES ON mysql.* TO 'backup'@'myserver';
FLUSH PRIVILEGES;
For MySQL 8.0.19+
CREATE USER 'mysqlbackup'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
CREATE USER 'mysqlbackup'@'node1' IDENTIFIED BY 'samepasswordasabove';
CREATE USER 'mysqlbackup'@'node2' IDENTIFIED BY 'samepasswordasabove';
CREATE USER 'mysqlbackup'@'node3' IDENTIFIED BY 'samepasswordasabove';
GRANT SELECT, RELOAD, PROCESS, SUPER, REPLICATION CLIENT
ON *.*
TO 'mysqlbackup'@'localhost',
'mysqlbackup'@'node1',
'mysqlbackup'@'node2',
'mysqlbackup'@'node2';
GRANT BACKUP_ADMIN
ON *.*
TO 'mysqlbackup'@'localhost',
'mysqlbackup'@'node1',
'mysqlbackup'@'node2',
'mysqlbackup'@'node2';
GRANT CREATE, INSERT, DROP, UPDATE
ON mysql.backup_progress
TO 'mysqlbackup'@'localhost',
'mysqlbackup'@'node1',
'mysqlbackup'@'node2',
'mysqlbackup'@'node2';
GRANT CREATE, INSERT, DROP, UPDATE, SELECT, ALTER
ON mysql.backup_history
TO 'mysqlbackup'@'localhost',
'mysqlbackup'@'node1',
'mysqlbackup'@'node2',
'mysqlbackup'@'node2';
Note also that the hostname for "node1","node2" etc should be the fully qualified name including domain information...hostname --fqdn
Note that you are likely to see this warning message (which can be ignored... at some point the MySQL documentation will, presumably, be updated with an updated set of GRANTs)... Warning (code 1287): The SUPER privilege identifier is deprecated:
GRANT SELECT ON performance_schema.variables_info TO 'mysqlbackup'@'myserver';
GRANT SELECT ON performance_schema.log_status TO 'mysqlbackup'@'myserver';
Store Password
Securely store password for mysqlbackup user...
Do this on every node in an innodb cluster so that backups still work after a failover/switchovermysql_config_editor set --login-path=mysqlbackup --user=mysqlbackup --password
Patch
Upgrade
For MySQL 8.0
GRANT CREATE, INSERT, DROP ON mysql.backup_history_old TO 'mysqlbackup'@'myserver'; # For upgrades to release 8.0.12+
GRANT CREATE, INSERT, DROP, ALTER ON mysql.backup_history_new TO 'mysqlbackup'@'myserver'; # For upgrades to release 8.0.12+
https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/backup-history-table-update.htmlGRANT ALTER ON mysql.backup_progress TO 'mysqlbackup'@'myserver'; # For upgrades to release 8.0.19+
GRANT CREATE, INSERT, DROP ON mysql.backup_progress_old TO 'mysqlbackup'@'myserver'; # For upgrades to release 8.0.19+
GRANT CREATE, INSERT, DROP, ALTER ON mysql.backup_progress_new TO 'mysqlbackup'@'myserver'; # For upgrades to release 8.0.19+
https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/backup-progress-table-update.htmlDeinstall
Bibliography
https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/backup-history-table-update.htmlhttps://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/mysqlbackup.privileges.html
https://www.fromdual.com/mysql-enterprise-backup-support-matrix
https://support.oracle.comWhat Is The Recommended Patch Cycle For Mysql (Doc ID 2655055.1)Which Versions of MySQL Server are Compatible with MySQL Enterprise Backup (MEB)? (Doc ID 1392194.1)MySQL Enterprise Backup Best Practices (Doc ID 2187972.1)