Xtrabackup query

how can i merge incemental backup with previous incremental backup rather than full backup in percona xtrabackup

1 Like

Hello, I am assuming you mean at restore time? you should apply incrementals in order as the following:

xtrabackup --prepare --apply-log-only --target-dir=BASE-DIR
xtrabackup --prepare --apply-log-only --target-dir=BASE-DIR --incremental-dir=INCREMENTAL-DIR-1
xtrabackup --prepare --apply-log-only --target-dir=BASE-DIR --incremental-dir=INCREMENTAL-DIR-2

when you reach the last incremental, run it as follows:

xtrabackup --prepare --target-dir=BASE-DIR --incremental-dir=INCREMENTAL-DIR-3

If you are talking about the backup phase, the incremental of an incremental is taken as follows:

xtrabackup --backup --target-dir=INCREMENTAL-DIR-2 --incremental-basedir=INCREMENTAL-DIR-1
1 Like