It’s official, Percona XtraBackup does not support MariaDB 5.2 & 5.3 MySQL yet
Percona XtraBackup tool for non-blocking MySQL InnoDB and XtraDB backups has been out for a while now. There’s been an outstanding bug #733665 logged since March, 2011 with regards to Percona XtraBackup’s innobackupex-1.5.1 script not detecting MariaDB 5.2 and now 5.3 based MySQL forks.
When you run Percona XtraBackup’s innobackupex-1.5.1 script with MariaDB 5.2 or 5.3 installed, the script will fail. I’ve mentioned this before on page 3 of my mysqlmybackup.sh script article and provided a patch for it for the version of Percona XtraBackup at that time which was v1.60 Rev 245. The innobackupex-1.5.1 script will fail with ending line 336:
innobackupex-1.5.1: Error: ibbackup child process has died at /usr/bin/innobackupex-1.5.1 line 336. |
I recently revisited this with MariaDB 5.2.10 and Percona XtraBackup v1.6.4 Rev 314 and the same problem happens still – that is MariaDB 5.2 and 5.3 isn’t properly recognised by Percona XtraBackup. It seems to be pretty much certain that Percona XtraBackup tool isn’t going to officially support MariaDB 5.2 and 5.3 with the latest bug status update statement:
MariaDB is not in the official list of supported databases. The bug is to stay in Wishlist until we decide to change that.
So folks using MariaDB 5.2 or 5.3 MySQL server just be aware that Percona XtraBackup may not work with your version of MySQL.
Patch fix work around
I’ve updated my patch for Percona XtraBackup v1.6.4 Rev 314 and tested it against MariaDB 5.2.10 64bit on CentOS 6.2 64bit and it works fine. If you really need the patch, you can contact me. But I take no responsibility for any issues you come across, so use it at your risk or wait until Percona updates XtraBackup to official support MariaDB 5.2 and 5.3.
Here’s sample output with MariaDB 5.2.10 working properly on patched version of Percona XtraBackup Rev 1.6.4 Rev 314:
[root@sbe backup]# /usr/bin/innobackupex-1.5.1 /backup InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy and Percona Inc 2009-2011. All Rights Reserved. This software is published under the GNU GENERAL PUBLIC LICENSE Version 2, June 1991. 120106 21:57:43 innobackupex-1.5.1: Starting mysql with options: --unbuffered -- 120106 21:57:43 innobackupex-1.5.1: Connected to database with mysql child process (pid=9996) 120106 21:57:49 innobackupex-1.5.1: Connection to database server closed IMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex-1.5.1 prints "completed OK!". innobackupex-1.5.1: Using mysql Ver 14.16 Distrib 5.2.10-MariaDB, for unknown-linux-gnu (x86_64) using readline 5.1 innobackupex-1.5.1: Using mysql server version This software comes with ABSOLUTELY NO WARRANTY. This is free software, innobackupex-1.5.1: Created backup directory /backup/2012-01-06_21-57-49 120106 21:57:49 innobackupex-1.5.1: Starting mysql with options: --unbuffered -- 120106 21:57:49 innobackupex-1.5.1: Connected to database with mysql child process (pid=10019) 120106 21:57:51 innobackupex-1.5.1: Connection to database server closed 120106 21:57:51 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup --backup --suspend-at-end --target-dir=/backup/2012-01-06_21-57-49 innobackupex-1.5.1: Waiting for ibbackup (pid=10025) to suspend innobackupex-1.5.1: Suspend file '/backup/2012-01-06_21-57-49/xtrabackup_suspended' xtrabackup version 1.6.4 for Percona Server 5.1.59 unknown-linux-gnu (x86_64) (revision id: 314) xtrabackup: uses posix_fadvise(). xtrabackup: cd to /var/lib/mysql InnoDB: Warning: innodb_log_block_size has been changed from its default value. (###EXPERIMENTAL### operation) InnoDB: The log block size is set to 4096. xtrabackup: Target instance is assumed as followings. xtrabackup: innodb_data_home_dir = ./ xtrabackup: innodb_data_file_path = ibdata1:2G:autoextend xtrabackup: innodb_log_group_home_dir = ./ xtrabackup: innodb_log_files_in_group = 2 xtrabackup: innodb_log_file_size = 536870912 xtrabackup: use O_DIRECT 120106 21:57:51 InnoDB: Warning: allocated tablespace 10, old maximum was 9 >> log scanned up to (262144247) [01] Copying ./ibdata1 to /backup/2012-01-06_21-57-49/ibdata1 >> log scanned up to (262144247) [01] ...done [01] Copying ./sbtest/sbtest1.ibd to /backup/2012-01-06_21-57-49/sbtest/sbtest1.ibd >> log scanned up to (262144247) [01] ...done 120106 21:58:05 innobackupex-1.5.1: Continuing after ibbackup has suspended 120106 21:58:05 innobackupex-1.5.1: Starting mysql with options: --unbuffered -- 120106 21:58:05 innobackupex-1.5.1: Connected to database with mysql child process (pid=10040) >> log scanned up to (262144247) 120106 21:58:07 innobackupex-1.5.1: Starting to lock all tables... >> log scanned up to (262144247) >> log scanned up to (262144247) 120106 21:58:17 innobackupex-1.5.1: All tables locked and flushed to disk 120106 21:58:17 innobackupex-1.5.1: Starting to backup .frm, .MRG, .MYD, .MYI, innobackupex-1.5.1: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files in innobackupex-1.5.1: subdirectories of '/var/lib/mysql' innobackupex-1.5.1: Backing up files '/var/lib/mysql/mysql/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (69 files) innobackupex-1.5.1: Backing up file '/var/lib/mysql/sbtest/sbtest1.frm' innobackupex-1.5.1: Backing up file '/var/lib/mysql/sbtest/db.opt' 120106 21:58:17 innobackupex-1.5.1: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt files innobackupex-1.5.1: Resuming ibbackup xtrabackup: The latest check point (for incremental): '262144247' >> log scanned up to (262144247) xtrabackup: Stopping log copying thread. xtrabackup: Transaction log of lsn (262144247) to (262144247) was copied. 120106 21:58:19 innobackupex-1.5.1: All tables unlocked 120106 21:58:19 innobackupex-1.5.1: Connection to database server closed innobackupex-1.5.1: Backup created in directory '/backup/2012-01-06_21-57-49' innobackupex-1.5.1: MySQL binlog position: filename '', position 120106 21:58:19 innobackupex-1.5.1: completed OK! ls -lh /backup/2012-01-06_21-57-49 total 2.1G -rw-r--r-- 1 root root 334 Jan 6 21:57 backup-my.cnf -rw-r--r-- 1 root root 2.0G Jan 6 21:58 ibdata1 drwxr-xr-x 2 root root 4.0K Jan 6 21:58 mysql drwx------ 2 root root 4.0K Jan 6 21:58 sbtest drwxr-xr-x 2 root root 4.0K Jan 6 21:58 test -rw-r--r-- 1 root root 10 Jan 6 21:58 xtrabackup_binary -rw-r--r-- 1 root root 1 Jan 6 21:58 xtrabackup_binlog_info -rw-r--r-- 1 root root 81 Jan 6 21:58 xtrabackup_checkpoints -rw-r--r-- 1 root root 20K Jan 6 21:58 xtrabackup_logfile |
Unfortunately, Percona XtraBackup isn’t the only tool with MySQL compatibility issues. Mydumper multi-threaded backup tool doesn’t seem to properly work with MySQL 5.5.x as yet according to bug #803982 but works fine with MariaDB 5.2 and MySQL Community 5.1.x releases. Then there’s issues with MariaDB 5.2.9/5.2.10 with Tungsten Replicator based replication – issue #256 which weren’t present in MariaDB 5.2.7 which I tested with before. Hopefully, these issues eventually get fixed – at least my favourite pairing works fine, MariaDB 5.2/5.3 + Mydumper.