Hello !
While running xtrabackup --prepare --export --target-dir=$BACKUP_DIR/full
does everything as expected, trying to do the same thing with incremental backups does not generate .cfg files.
My process is:
xtrabackup --prepare --export --apply-log-only --target-dir=$BACKUP_DIR/full
xtrabackup --prepare --export --target-dir=$BACKUP_DIR/full --incremental-dir=$BACKUP_DIR/inc1
Attached are the prepare logs which do not seem to contain any errors, the end result is that $BACKUP_DIR/full/db contains only .ibd files
prepare_log.txt (85.6 KB)
Am I doing something wrong here ?
can you remove the --export from the first command and retry (You may have to redownload the full and incremental backup directories again), second command is fine.
xtrabackup --prepare --export --apply-log-only --target-dir=$BACKUP_DIR/full
to
xtrabackup --prepare --apply-log-only --target-dir=$BACKUP_DIR/full
This unfortunately does not change the result, still no .cfg files in the target-dir.
Attached are the updated prepare logs
prepare_log.txt (85.4 KB)
I see that xtrabackup reached the code that creates .cfg files.
2025-05-15T13:14:07.498092+02:00 0 [Note] [MY-011825] [Xtrabackup] export option is specified.
What is the Server version you have backed up?
~# xtrabackup --version
2025-05-22T13:05:51.481328+02:00 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --datadir=/var/lib/mysql/ --log_bin=binlog --server-id=34
xtrabackup version 8.0.35-32 based on MySQL server 8.0.35 Linux (x86_64) (revision id: c339924a)
~# mysql --version
mysql Ver 8.0.41-32 for Linux on x86_64 (Percona Server (GPL), Release '32', Revision 'b8e378ec')
When applying incrementals, there is logic to delete files that are deleted between backups and it delets the cfg files, please fix your steps to:
xtrabackup --prepare --apply-log-only --target-dir=$BACKUP_DIR/full
xtrabackup --prepare --target-dir=$BACKUP_DIR/full --incremental-dir=$BACKUP_DIR/inc1
xtrabackup --prepare --target-dir=$BACKUP_DIR/full --export