incremental backups do not include xtrabackup_binlog_info and xtrabackup_galera_info

Bug #1643803 reported by Grigorijs on 2016-11-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.3
Fix Released
High
Sergei Glushchenko
2.4
Fix Released
High
Sergei Glushchenko

Bug Description

Restoring incremental xtrabackup on PXC cluster with --galera-info option do not create xtrabackup_galera_info file. On the other hand for full backup option works correctly and galera information is restored.

Used software versions:
ii percona-xtrabackup-24 2.4.4-1.jessie amd64
ii percona-xtradb-cluster-57 5.7.14-26.17-1.jessie amd64

Tried both specifying --galera-info for --prepare, and --galera-info --binlog-info=ON wuth --backup - in both cases result is the same - for full backup galera info is present, for incremental missing

Same situation for xtrabackup_binlog_info - after full backup it is present, after incremental is missing. The only present is xtrabackup_binlog_pos_innodb

Grigorijs (grigk) on 2016-11-22
summary: - incremental backups do not include xtrabackup_galera_info
+ incremental backups do not include xtrabackup_binlog_info and
+ xtrabackup_galera_info
description: updated
Jericho Rivera (jericho-rivera) wrote :

Hi,

how you are restoring from a full + incremental backup?

Please provide the following:

- commands used to take full and incremental backups
- commands used to prepare the backup (full + incremental)
- directory listing after backup has been prepared

Changed in percona-xtrabackup:
status: New → Incomplete
Grigorijs (grigk) wrote :
Download full text (3.7 KiB)

Hi

Command for full backup:
xtrabackup --defaults-file=/usr/local/etc/bkp/.my.cnf --backup --extra-lsndir=/var/mysql-backup/lsn --target-dir=/var/mysql-backup --compress --stream=xbstream | ssh bkp@backuphost "cat - > /var/mysql-backup/xtrabackup/full.xbstream"

For subsequent incremental backup(s):
xtrabackup --defaults-file=/usr/local/etc/bkp/.my.cnf --backup --extra-lsndir=/var/mysql-backup/lsn --target-dir=/var/mysql-backup --incremental-basedir=/var/mysql-backup/lsn --compress --stream=xbstream | ssh bkp@backuphost "cat - > /var/mysql-backup/xtrabackup/inc.xbstream"

PREPARE FULL BACKUP ONLY:
cat full.xbstream | xbstream -x -C /var/mysql-backup/xtrabackup/restore/mysql0
for bf in `find /var/mysql-backup/xtrabackup/restore/mysql0 -iname '*\.qp'`; do qpress -d $bf $(dirname $bf) && rm $bf; done
xtrabackup --galera-info --prepare --target-dir=/var/mysql-backup/xtrabackup/restore/mysql0

Directory listing:
$ ls -l /var/mysql-backup/xtrabackup/restore/mysql0
total 1476028
-rw-r--r-- 1 bkp bkp 426 Nov 28 08:16 backup-my.cnf
-rw-r--r-- 1 bkp bkp 1415398 Nov 28 08:16 ib_buffer_pool
-rw-r--r-- 1 bkp bkp 415236096 Nov 28 08:18 ibdata1
-rw-r----- 1 bkp bkp 536870912 Nov 28 08:18 ib_logfile0
-rw-r----- 1 bkp bkp 536870912 Nov 28 08:18 ib_logfile1
-rw-r----- 1 bkp bkp 12582912 Nov 28 08:18 ibtmp1
drwxr-x--- 2 bkp bkp 4096 Nov 28 08:16 mysql
drwxr-x--- 2 bkp bkp 12288 Nov 28 08:16 performance_schema
drwxr-x--- 2 bkp bkp 4096 Nov 28 08:16 sbtest
drwxr-x--- 2 bkp bkp 16384 Nov 28 08:18 straume
drwxr-x--- 2 bkp bkp 12288 Nov 28 08:16 sys
drwxr-x--- 2 bkp bkp 4096 Nov 28 08:16 test
-rw-r--r-- 1 bkp bkp 26 Nov 28 08:18 xtrabackup_binlog_info
-rw-r--r-- 1 bkp bkp 26 Nov 28 08:18 xtrabackup_binlog_pos_innodb
-rw-r----- 1 bkp bkp 123 Nov 28 08:18 xtrabackup_checkpoints
-rw-r--r-- 1 bkp bkp 45 Nov 28 08:18 xtrabackup_galera_info
-rw-r--r-- 1 bkp bkp 555 Nov 28 08:16 xtrabackup_info
-rw-r--r-- 1 bkp bkp 8388608 Nov 28 08:18 xtrabackup_logfile

PREPARE FULL + INCREMENTAL BACKUP:
cat full.xbstream | xbstream -x -C /var/mysql-backup/xtrabackup/restore/mysql0
for bf in `find /var/mysql-backup/xtrabackup/restore/mysql0 -iname '*\.qp'`; do qpress -d $bf $(dirname $bf) && rm $bf; done
xtrabackup --galera-info --prepare --apply-log-only --target-dir=/var/mysql-backup/xtrabackup/restore/mysql0
cat inc.xbstream | xbstream -x -C /var/mysql-backup/xtrabackup/restore/mysql1
for bf in `find /var/mysql-backup/xtrabackup/restore/mysql1 -iname '*\.qp'`; do qpress -d $bf $(dirname $bf) && rm $bf; done
xtrabackup --galera-info --prepare --target-dir=/var/mysql-backup/xtrabackup/restore/mysql0 --incremental-dir=/var/mysql-backup/xtrabackup/restore/mysql1

Directory listing:
$ ls -l /var/mysql-backup/xtrabackup/restore/mysql0
total 427436
-rw-r--r-- 1 bkp bkp 426 Nov 28 08:07 backup-my.cnf
-rw-r--r-- 1 bkp bkp 1415398 Nov 28 08:07 ib_buffer_pool
-rw-r--r-- 1 bkp bkp 415236096 Nov 28 08:08 ibdata1
-rw-r----- 1 bkp bkp 12582912 Nov 28 08:08 ibtmp1
drwxr-x--- 2 bkp bkp 4096 Nov 28 08:08 mysql
drwxr-x--- 2 bkp bkp 12288 Nov 28 08:08 performance_schema
drwxr-x--- 2 bkp bkp 4096 Nov 28 08:0...

Read more...

Thank you for your report!

Indeed, xtrabackup_galera_info is not generated during second prepare and then old file removed.

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-489

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers