I am trying to set up an incremental backup solution for my MariaDB database (stored in MyISAM storage, which is listed as supported) using the included mariabackup
tool (a version of xtrabackup
).
The issue I'm having is that the 'incremental' backups are all identical in size to the primary full backup and to one another. The steps I am going through are as follows.
First, I make a full backup of the database:
mariabackup --backup --databases="database" --target-dir /some/place/backup/full/ \
--user backupuser
This creates a full backup which can be successfully prepared and restored.
Next, I aattempt to make an incremental backup using the command:
mariabackup --backup --databases="database" --target-dir /some/place/backup/inc/1/ \
--incremental-basedir /some/place/backup/full/ --user backupuser
This command runs without error but it creates a full backup, even though the from_lsn
and to_lsn
are both identical (the largest/latest lsn).
Regardless of whether the lsn has incremented since the last backup, the log always shows xtrabackup: Transaction log of lsn (x) to (x) was copied.
where x is the database's current lsn number.
If no data has been entered in the database since the last backup, then looking at the xtrabackup_checkpoints
files I see:
Full backup:
backup_type = full-backuped
from_lsn = 0
to_lsn = 1706249
last_lsn = 1706249
recover_binlog_info = 0
Incremental backups:
backup_type = incremental
from_lsn = 1706249
to_lsn = 1706249
last_lsn = 1706249
recover_binlog_info = 0
In this case the incremental backups seem like they should be copying no data over.
If the lsn has increased since the last backup, I see:
Full backup:
backup_type = full-backuped
from_lsn = 0
to_lsn = 1706249
last_lsn = 1706249
recover_binlog_info = 0
Incremental backups:
backup_type = incremental
from_lsn = 1706249
to_lsn = 1706269
last_lsn = 1706269
recover_binlog_info = 0
In this case it looks like it should be copying only 1706249 to 1706269, but it copies the entire db. What am I doing wrong?