Hey, guys, I’m using MariaDB 10.5.11 and mariabackup.
After I created a full backup, I inserted some data into the MariaDB, and then I do incremental backup for testing.
But I found that xtrabackup_checkpoints
have the same from_lsn
and to_lsn
even if I inserted some data before incremental backup.
That seems weird to me.
Env:
CentOS 7
MariaDB 10.5.11 with bundled mariabackup
Steps to reproduce:
- Create a full backup
-- create database foobar;
-- use foobar;
-- CREATE TABLE t(id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL);
$ mysql -e 'select count(*) from foobar.t \G'
*************************** 1. row ***************************
count(*): 10
$ mariabackup --defaults-file=/etc/my.cnf \
--socket=/var/lib/mysql/mysql.sock \
--user=root --password=123456 --parallel=2 \
--compress --compress-threads=2 \
--backup --target-dir /tmp/backup-test/0
$ cat /tmp/backup-test/0/xtrabackup_checkpoints
backup_type = full-backuped
from_lsn = 0
to_lsn = 56844
last_lsn = 56856
- Insert some data into MariaDB
# 10 times
$ mysql -e 'insert into foobar.t values()'
$ mysql -e 'select count(*) from foobar.t \G'
*************************** 1. row ***************************
count(*): 20
- Do an incremental backup
$ mariabackup --defaults-file=/etc/my.cnf \
--socket=/var/lib/mysql/mysql.sock \
--user=root --password=123456 --parallel=2 \
--compress --compress-threads=2 \
--incremental-basedir /tmp/backup-test/0 \
--backup --target-dir /tmp/backup-test/1
$ cat /tmp/backup-test/1/xtrabackup_checkpoints
backup_type = incremental
from_lsn = 56844
to_lsn = 56844
last_lsn = 60504
As you can see, the last_lsn
had been changed, yet the from_lsn
and to_lsn
remain equals.