I'm trying to create an incremental backup with mariabackup for a script. While it works, there's one thing I don't understand.
In the documentation, it is stated that the first full backup should contain the following in xtrabackup_checkpoints:
backup_type = full-backuped
from_lsn = 0
to_lsn = 1635102
last_lsn = 1635102
recover_binlog_info = 0
The first incremental backup should have:
backup_type = full-backuped
from_lsn = 0
to_lsn = 1635102
last_lsn = 1635102
recover_binlog_info = 0
We can see that the from_lsn of the incremental backup matches the to_lsn and last_lsn of the full backup.
However, when I test it on my side, I get a different result. For the full backup:
backup_type = full-backuped
from_lsn = 0
to_lsn = 46830
last_lsn = 6306692
And for the incremental backup:
backup_type = incremental
from_lsn = 46830
to_lsn = 46830
last_lsn = 6891089
The from_lsn of the incremental backup seems correct, but the to_lsn hasn't changed. However, even the last_lsn has increased (I'm adding data between the dumps).
When I look in the target-dir, I can see the new data.
I also tested with the latest version, but apart from xtrabackup_checkpoints being renamed to mariadb_backup_checkpoints, I get the same result.
How does it work?