← Back to team overview

maria-discuss team mailing list archive

Bug in incremental backups since MariaDB version 10.5.7 with mariabackup?

 

Hi @ll,

I am using mariabackup since 2 years. I wanted to upgrade from version
10.4.24 to 10.6.10 but I found out that incremental Backups does not work
as expected because of size. Further investigation show that it is since
version 10.5.7.

Then I have found out that in the file xtrabackup_checkpoints the value for
to_lsn is not changing in version 10.5.7 and 10.6.10.

Using the command 'mysql -e "SHOW ENGINE INNODB STATUS\G" | egrep "Last
check"' show that values are the same with that command and the value
to_lsn in the file xtrabackup_checkpoints.

Backup-commands used in test environment:

mariabackup --extra-lsndir=/var/backup/full --backup --compress
--stream=xbstream --user=root --password=root --target-dir=/var/backup/full
> /var/backup/full/full.xbstream
mariabackup --extra-lsndir=/var/backup/inc1 --backup --compress
--stream=xbstream --user=root --password=root
--incremental-basedir=/var/backup/full  --target-dir=/var/backup/inc1 >
/var/backup/inc1/inc1.xbstream
mariabackup --extra-lsndir=/var/backup/inc2 --backup --compress
--stream=xbstream --user=root --password=root
--incremental-basedir=/var/backup/inc1  --target-dir=/var/backup/inc2 >
/var/backup/inc2/inc2.xbstream
mariabackup --extra-lsndir=/var/backup/inc3 --backup --compress
--stream=xbstream --user=root --password=root
--incremental-basedir=/var/backup/inc2  --target-dir=/var/backup/inc3 >
/var/backup/inc3/inc3.xbstream

Size of files compared between version 10.5.6 and 10.5.7:

[root@mysqlsingle2 backup]# ls *10.5.6/*xbstream -lh
-rw-r--r-- 1 root root 765K  2. Nov 13:03 full-10.5.6/full.xbstream
-rw-r--r-- 1 root root 779K  2. Nov 13:06 inc1-10.5.6/inc1.xbstream
-rw-r--r-- 1 root root 1,2M  2. Nov 13:16 inc2-10.5.6/inc2.xbstream
-rw-r--r-- 1 root root 752K  2. Nov 13:17 inc3-10.5.6/inc3.xbstream

[root@mysqlsingle2 backup]# ls -lh *10.5.7/*xbstream
-rw-r--r-- 1 root root 763K  2. Nov 13:22 full-10.5.7/full.xbstream
-rw-r--r-- 1 root root 723K  2. Nov 13:23 inc1-10.5.7/inc1.xbstream # added
2000 rows
-rw-r--r-- 1 root root 2,1M  2. Nov 13:30 inc2-10.5.7/inc2.xbstream # added
20000 rows
-rw-r--r-- 1 root root 2,2M  2. Nov 13:31 inc3-10.5.7/inc3.xbstream # added
2000 rows

to_lsn in file xtrabackup_checkpoints:

[root@mysqlsingle2 backup]# cat full*/*checkpoints | grep "to_lsn"
to_lsn = 47455 # 10.5.6
to_lsn = 45118 # 10.5.7
[root@mysqlsingle2 backup]# cat inc1*/*checkpoints | grep "to_lsn"
to_lsn = 487597 # 10.5.6
to_lsn = 45118 # 10.5.7
[root@mysqlsingle2 backup]# cat inc2*/*checkpoints | grep "to_lsn"
to_lsn = 4572514 # 10.5.6
to_lsn = 45118 # 10.5.7
[root@mysqlsingle2 backup]# cat inc3*/*checkpoints | grep "to_lsn"
to_lsn = 4995024 # 10.5.6
to_lsn = 45118 # 10.5.7

'Last checkpoint at' from command 'mysql -e "SHOW ENGINE INNODB STATUS\G" |
egrep "Last check"':

[root@mysqlsingle2 backup]# cat full*/*Last*
Last checkpoint at  47455
Last checkpoint at  45118
[root@mysqlsingle2 backup]# cat inc1*/*Last*
Last checkpoint at  487597
Last checkpoint at  45118
[root@mysqlsingle2 backup]# cat inc2*/*Last*
Last checkpoint at  4572514
Last checkpoint at  45118
[root@mysqlsingle2 backup]# cat inc3*/*Last*
Last checkpoint at  4995024
Last checkpoint at  45118

Kind regards

Michael