Xtrabackup backup fails, [MY-011825] [Xtrabackup] recv_find_max_checkpoint ()

用了xtrabackup8.0.31-24,xtrabackup8.0.32-25,xtrabackup8.0.32-26,xtrabackup8.0.33-27备份数据都会出现2023-06-08T09:58:32.851737+08:00 0 [ERROR] [MY-011825] [Xtrabackup] recv_find_max_checkpoint() failed. 这个错误

Hello @lcy,
Can you please post in English? Make sure you are using Xtrabackup version that matches exactly your MySQL version. Do not use Xtrabackup 8.0.32 with MySQL 8.0.30.

Using mysql version 8.0.32 and xtrabackup version 8.0.32-26, backups still appear
[ERROR] [MY-011825] [Xtrabackup] recv_find_max_checkpoint() failed. This mistake

Hello @lcy,
Can you please provide more information? Please provide more output log. Please provide the entire command you are using for xtrabackup.

Here is my complete command with output log:
xtrabackup --host=192.168.0.118 --port=14566 --user=root --password=ads464asdww --datadir=/var/lib/docker/volumes/44d24688fa39dd1aedb547d36c66816d4e45d44fd664990f220de8c9598d4e6e/_data --backup --target-dir=/var/xtrabackup/fullbf --databases=“wxamp_location_202304”
2023-06-08T09:58:32.661181+08:00 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --datadir=/var/lib/mysql --innodb_force_recovery=6 --log_bin=0 --datadir=/var/lib/docker/volumes/44d24688fa39dd1aedb547d36c66816d4e45d44fd664990f220de8c9598d4e6e/_data
2023-06-08T09:58:32.661296+08:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --host=192.168.0.118 --port=14566 --user=root --password=* --backup=1 --target-dir=/var/xtrabackup/fullbf --databases=wxamp_location_202304
xtrabackup version 8.0.32-26 based on MySQL server 8.0.32 Linux (x86_64) (revision id: 34cf2908)
230608 09:58:32 version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;host=192.168.0.118;port=14566’ as ‘root’ (using password: YES).
230608 09:58:32 version_check Connected to MySQL server
230608 09:58:32 version_check Executing a version check against the server…
230608 09:58:32 version_check Done.
2023-06-08T09:58:32.715721+08:00 0 [Note] [MY-011825] [Xtrabackup] Connecting to MySQL server host: 192.168.0.118, user: root, password: set, port: 14566, socket: not set
2023-06-08T09:58:32.728361+08:00 0 [Note] [MY-011825] [Xtrabackup] Using server version 8.0.32
2023-06-08T09:58:32.732645+08:00 0 [Warning] [MY-011825] [Xtrabackup] MySQL variable ‘datadir’ points to nonexistent directory ‘/var/lib/mysql/’
2023-06-08T09:58:32.732679+08:00 0 [Warning] [MY-011825] [Xtrabackup] option ‘datadir’ has different values: ‘/var/lib/docker/volumes/44d24688fa39dd1aedb547d36c66816d4e45d44fd664990f220de8c9598d4e6e/_data’ in defaults file ‘/var/lib/mysql/’ in SHOW VARIABLES
2023-06-08T09:58:32.732991+08:00 0 [Note] [MY-011825] [Xtrabackup] Executing LOCK INSTANCE FOR BACKUP …
2023-06-08T09:58:32.733689+08:00 0 [Note] [MY-011825] [Xtrabackup] uses posix_fadvise().
2023-06-08T09:58:32.733722+08:00 0 [Note] [MY-011825] [Xtrabackup] cd to /var/lib/docker/volumes/44d24688fa39dd1aedb547d36c66816d4e45d44fd664990f220de8c9598d4e6e/_data
2023-06-08T09:58:32.733737+08:00 0 [Note] [MY-011825] [Xtrabackup] open files limit requested 0, set to 65535
2023-06-08T09:58:32.746604+08:00 0 [Note] [MY-011825] [Xtrabackup] using the following InnoDB configuration:
2023-06-08T09:58:32.746632+08:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_home_dir = .
2023-06-08T09:58:32.746639+08:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_file_path = ibdata1:12M:autoextend
2023-06-08T09:58:32.746674+08:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_group_home_dir = ./
2023-06-08T09:58:32.746681+08:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_files_in_group = 2
2023-06-08T09:58:32.746691+08:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_file_size = 50331648
2023-06-08T09:58:32.748012+08:00 0 [Note] [MY-011825] [Xtrabackup] inititialize_service_handles suceeded
2023-06-08T09:58:32.851737+08:00 0 [ERROR] [MY-011825] [Xtrabackup] recv_find_max_checkpoint() failed.

You can see some errors here. There is a path that does not exist and thus xtrabackup cannot find the files it needs. You need to fix your /etc/my.cnf so that $datadir points to the correct location.

2023-06-08T09:58:32.732645+08:00 0 [Warning] [MY-011825] [Xtrabackup] MySQL variable ‘datadir’ points to nonexistent directory ‘/var/lib/mysql/’
2023-06-08T09:58:32.732679+08:00 0 [Warning] [MY-011825] [Xtrabackup] option ‘datadir’ has different values: ‘/var/lib/docker/volumes/44d24688fa39dd1aedb547d36c66816d4e45d44fd664990f220de8c9598d4e6e/_data’ in defaults file ‘/var/lib/mysql/’ in SHOW VARIABLES

Thank you very much. It’s settled. Since my mysql is deployed in docker, the mapped path is not /var/lib/mysql. According to your prompt, I have specified a file using --defaults-file=/var/xtrabackup/mysql_conf/my.cnf. All mapped paths have been modified in it.