XtraBackup 8.0.35-32 docker container error "Cannot create redo log files in read-only mode"

Hi,

I’m trying to set up an XtraBackup 8.0.35-32 docker container for use with a MySQL 8.0.40 (also in docker container) and get the following error:

xtrabackup  | 2025-01-22T14:12:17.535798-00:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --backup=1 --target-dir=/backup --host=dbXXX-db-1 --port=3306 --user=xtrabackup --password=* --keyring-file-data=/var/lib/mysql-keyring/keyring
xtrabackup  | xtrabackup version 8.0.35-32 based on MySQL server 8.0.35 Linux (x86_64) (revision id: c339924a)
...
xtrabackup  | 2025-01-22T14:12:17.729835-00:00 0 [Note] [MY-011825] [Xtrabackup] inititialize_service_handles suceeded
xtrabackup  | 2025-01-22T14:12:17.835685-00:00 0 [ERROR] [MY-012889] [InnoDB] Cannot create redo log files in read-only mode (--innodb-read-only).

Exact command used in docker compose is

xtrabackup --backup --data-dir=/var/lib/mysql --target-dir=/backup --host=dbXXX-db-1 --port=3306 --user=xtrabackup --password=*** --keyring-file-data=/var/lib/mysql-keyring/keyring

The target directory is writeable from inside the container.

Is Percona XtraBackup 8.0.35-32 compatible with MySQL 8.0.40 Community edition?

Yes, PXB 8.0.35 is forward compatible. So it should it work with 8.0.40

Please check if the my.cnf has innodb-read-only parameter set