Open source tool for performing hot backups of MariaDB, MySQL and Percona Server databases
Percona XtraBackup is not supported in MariaDB. mariadb-backup is the recommended backup method to use instead of Percona XtraBackup. See Percona XtraBackup Overview: Compatibility with MariaDB for more information.
Percona XtraBackup is not supported in MariaDB. mariadb-backup is the recommended backup method to use instead of Percona XtraBackup. See Percona XtraBackup Overview: Compatibility with MariaDB for more information.
Build instructions for Percona XtraBackup.
Solaris 10 (SunOS 5.10) notes:
Edit utils/build.sh and add -lrt -m64 to CFLAGS and CXXFLAGS.
Make sure that you're using GNU utils for building, including make, cmake, gcc, gawk, getopt, autotools, libtool, automake, autoconf and bazaar.
If you want to change MySQL version which to build against with edit one of the following lines:
MYSQL_51_VERSION=...
MYSQL_55_VERSION=...
PS_51_VERSION=...
PS_55_VERSION=..
When ready run one of the following depending on the MySQL version which you want to build with:
AUTO_DOWNLOAD="yes" ./utils/build.sh xtradb (build against XtraDB 5.1)
AUTO_DOWNLOAD="yes" ./utils/build.sh innodb51_builtin (build against built-in InnoDB in MySQL 5.1)
AUTO_DOWNLOAD="yes" ./utils/build.sh xtradb55 (build against XtraDB 5.5)
AUTO_DOWNLOAD="yes" ./utils/build.sh innodb55 (build against InnoDB in MySQL 5.5)
This page is licensed: CC BY-SA / Gnu FDL
Percona XtraBackup is not supported in MariaDB. mariadb-backup is the recommended backup method to use instead of Percona XtraBackup. See Percona XtraBackup Overview: Compatibility with MariaDB for more information.
Percona XtraBackup is an open source tool for performing hot backups of MariaDB, MySQL and Percona Server databases. Percona XtraBackup can perform compressed, incremental and streaming backups. It was designed to back up XtraDB/InnoDB tables but can also back up other storage engines.
mariadb-backup is a fork of Percona XtraBackup designed to work with encrypted and compressed tables and other MariaDB enhancements. There are many bug fixes, such as MDEV-13807, and some unsafe or redundant options have been removed. mariadb-backup is the recommended backup method for MariaDB servers.
Percona XtraBackup can also be installed via a package manager on Linux. In order to do so, your system needs to be configured to install from a repository that has it.
You can also configure your package manager to install it from Percona's repository by following the instructions in their documentation:
On RHEL, CentOS, Fedora, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's
repository using or . Starting with RHEL 8 and Fedora 22, yum has been replaced by dnf, which is the next major version of yum. However, yum commands still work on many systems that use dnf. For example, to install Percona XtraBackup 2.3:
And to install Percona XtraBackup 2.4:
On Debian, Ubuntu, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's repository using . For example, to install Percona XtraBackup 2.3:
And to install Percona XtraBackup 2.4:
On SLES, OpenSUSE, and other similar Linux distributions, it is highly recommended to install the relevant from MariaDB's repository using . For example, to install Percona XtraBackup 2.3:
And to install Percona XtraBackup 2.4:
The command to use xtrabackup and the general syntax is:
or:
Options supported by Percona XtraBackup can be found on Percona's documentation.
xtrabackup options:
innobackupex options:
In addition to reading options from the command line, Percona XtraBackup can also read options from .
The following options relate to how MariaDB/MySQL command line tools handles option files. They must be given as the first argument on the command line:
Percona XtraBackup reads server options from the following from :
Percona XtraBackup reads client options from the following from :
Percona XtraBackup needs to authenticate with the database server when it performs a backup operation (i.e. when the --backup option is specified). The user account that performs the backup needs to have the RELOAD , PROCESS, LOCK TABLES and REPLICATION CLIENT on the database server. For example:
The user account information can be specified with the -user and --password command line options. For example:
The user account information can also be specified in a supported in an . For example:
Percona XtraBackup does not need to authenticate with the database server when preparing or restoring a backup.
Percona XtraBackup has to read MariaDB's files from the file system. Therefore, when you run Percona XtraBackup as a specific operating system user, you should ensure that user account has sufficient permissions to read those files.
If you are using Linux and if you installed MariaDB with a package manager, then MariaDB's files will probably be owned by the mysql user and the mysql group.
In and later, is the recommended backup method to use instead of Percona XtraBackup.
In and later, Percona XtraBackup is not supported.
This limitation is being tracked by Percona XtraBackup bug . However, it does not appear that there are plans to fix it.
In , is the recommended backup method to use instead of Percona XtraBackup.
In , Percona XtraBackup 2.4 is supported in some cases if is not used, and if is not used, and if is set to 16k.
However, users should be aware that problems are likely due to the MySQL 5.7 undo log format incompatibility bug that was fixed in in . Due to this bug, backups prepared with Percona XtraBackup 2.4 may fail to recover some transactions. Only if you ran the server with the setting =1 this would not be a problem. Percona XtraBackup 2.4 may also fail to work entirely with and later if is set due to changes in the redo log format introduced by . In that case, you may see the following error:
In , is the recommended backup method to use instead of Percona XtraBackup.
In , Percona XtraBackup 2.3 is supported if is not used, and if is not used, and if is set to 16k.
In and before, Percona XtraBackup 2.3 is supported.
The xtrabackup-v2 SST method uses the utility for performing SSTs. See for more information.
This page is licensed: CC BY-SA / Gnu FDL
--print-defaults
Print the program argument list and exit.
--no-defaults
Don't read default options from any option file.
--defaults-file=#
Only read default options from the given file #.
--defaults-extra-file=#
Read this file after the global files are read.
[xtrabackup]
Options read by mariadb-backup and Percona XtraBackup.
[mysqld]
Options read by mysqld, which includes both MariaDB Server and MySQL Server.
[xtrabackup]
Options read by mariadb-backup and Percona XtraBackup.
[client]
Options read by all MariaDB and MySQL client programs, which includes both MariaDB and MySQL clients. For example, mysqldump.
sudo yum install percona-xtrabackupsudo yum install percona-xtrabackup-24sudo apt-get install percona-xtrabackupsudo apt-get install percona-xtrabackup-24sudo zypper install percona-xtrabackupsudo zypper install percona-xtrabackup-24xtrabackup <options>innobackupex <options>CREATE USER 'xtrabackup'@'localhost' IDENTIFIED BY 'mypassword';
GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'xtrabackup'@'localhost';$ xtrabackup --backup \
--target-dir=/var/mariadb/backup/ \
--user=xtrabackup --password=mypassword[xtrabackup]
user=xtrabackup
password=mypasswordInnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.2.19. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html