I use mariabackup
for creating incremental backups on a previously created full backup directory. The full backup is created using the following command:
mariabackup --backup --target-dir=/var/mariadb/backup/
And the subsequent incremental backups are created as follows:
mariabackup --backup --target-dir=/var/mariadb/inc1/ --incremental-basedir=/var/mariadb/backup/
Now everytime I try to restore the backups for testing purposes using mariabackup --prepare --target-dir=/var/mariadb/backup && mariabackup --prepare --target-dir=/var/mariadb/backup --incremental-dir=/var/mariadb/inc1
I get the following error:
error: This incremental backup seems not to be proper for the target. Check 'to_lsn' of the target and 'from_lsn' of the incremental
Indeed to_lsn
and from_lsn
differ in the target directory and in the incremental backup directory. The strange thing is that the first few incremental backups can be restored without a problem, only subsequent ones make problems (having different lsn
numbers).
How come they have different lsn
numbers when the same base directory is being used? Has anyone had the same problem and been able to solve it? Any solutions or tips?
Thanks in advance.