Xtrabackup 8.0.34

Seems like --datadir is ignored and the uncompressed files went to --target-dir

xtrabackup --decompress --target-dir=/backup/db --datadir=/data/db
2023-08-30T21:05:04.953152-04:00 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --datadir=/var/lib/mysql --datadir=/data/db
2023-08-30T21:05:04.953428-04:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --decompress=1 --target-dir=/backup/db

Is this a normal behavior?

Hi @ronnels

Thanks for your question. In fact, the behavior is correct. Users have to first decompress the files to later execute the --prepare stage, and this is all done in the backup dir (aka --target-dir). Here is the documentation for your reference Prepare the backup - Percona XtraBackup .

Let me know if you have any further questions.

Thank you Marcelo! Will do as you recommended.