All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

Percona XtraBackup Overview

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.

Installing Percona XtraBackup

Installing with a Package Manager

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:

Installing with yum/dnf

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:

Installing with apt-get

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:

Installing with zypper

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:

Using Percona XtraBackup

The command to use xtrabackup and the general syntax is:

or:

Options

Options supported by Percona XtraBackup can be found on Percona's documentation.

xtrabackup options:

innobackupex options:

Option Files

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:

Option
Description

Server Option Groups

Percona XtraBackup reads server options from the following from :

Group
Description

Client Option Groups

Percona XtraBackup reads client options from the following from :

Group
Description

Authentication and Privileges

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.

File System Permissions

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.

Compatibility with MariaDB

Compatibility with and Later

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.

Compatibility with

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:

Compatibility with

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.

Compatibility with and Before

In and before, Percona XtraBackup 2.3 is supported.

Using Percona XtraBackup for Galera SSTs

The xtrabackup-v2 SST method uses the utility for performing SSTs. See for more information.

See Also

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.

Installing Percona XtraBackup 2.3
Installing Percona XtraBackup 2.4
RPM package
yum
dnf
DEB package
apt-get
RPM package
zypper
xtrabackup options - Percona XtraBackup 2.3
xtrabackup options - Percona XtraBackup 2.4
innobackupex options - Percona XtraBackup 2.3
innobackupex options - Percona XtraBackup 2.4
option files
option groups
option files
option groups
option files
global privileges
client option group
option file
mariadb-backup
PXB-1550
mariadb-backup
InnoDB page compression
data at rest encryption
innodb_page_size
MDEV-12289
innodb_undo_logs
innodb_safe_truncate=ON
MDEV-14717
mariadb-backup
InnoDB page compression
data at rest encryption
innodb_page_size
Percona XtraBackup
xtrabackup-v2 SST method
mariadb-backup
mysqldump
Percona XtraBackup documentation
Percona JIRA

Percona XtraBackup

Open source tool for performing hot backups of MariaDB, MySQL and Percona Server databases

Percona XtraBackup is not supported in MariaDB. is the recommended backup method to use instead of Percona XtraBackup. See for more information.

sudo yum install percona-xtrabackup
sudo yum install percona-xtrabackup-24
sudo apt-get install percona-xtrabackup
sudo apt-get install percona-xtrabackup-24
sudo zypper install percona-xtrabackup
sudo zypper install percona-xtrabackup-24
xtrabackup <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=mypassword
InnoDB: 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
mariadb-backup
Percona XtraBackup Overview: Compatibility with MariaDB

Percona XtraBackup Build Instructions

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

MariaDB 10.3
MariaDB 10.3
MariaDB 10.3
MariaDB 10.2
MariaDB 10.2
MariaDB 10.2
MariaDB 10.2.2
MariaDB 10.2.19
MariaDB 10.1
MariaDB 10.1
MariaDB 10.1
MariaDB 10.0
MariaDB 10.0