Xtrabackup says "database page corruption" on fresh database

Hi there! Trying to run my first backup and I’m getting database page corruption detected from xtrabackup.

Here’s my context:

  • Debian 10 (fresh install)

  • Latest Percona PXC installed like this:

f=percona-release_latest.generic_all.deb
wget -nv https://repo.percona.com/apt/$f
export DEBIAN_FRONTEND=noninteractive
dpkg -i $f
apt_get update
apt_get install --fix-broken
percona-release setup -y pxc80
apt_get_install percona-xtradb-cluster percona-xtrabackup-80 qpress

the result of which is:

xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86_64) (revision id: 4aecf82)

Server version: 8.0.23-14.1 Percona XtraDB Cluster (GPL), Release rel14, Revision d3b9a1d, WSREP version 26.4.3

  • One mostly empty database, checked all /var/lib/mysq/*/*.ibd files in with innochecksum, got no output from it (that’s good right?).

  • The only config I set is log_bin_trust_function_creators = 1 because I’m having a few triggers and stored procs too in there.

  • My xtrabackup command:

xtrabackup --target-dir=bla --user=root --password=bla --backup

And here’s the output:

xtrabackup: recognized server arguments: --server-id=1 --datadir=/var/lib/mysql
xtrabackup: recognized client arguments: --socket=/var/run/mysqld/mysqld.sock --target-dir=/root/mm-bkp/test --user=root --password=* --backup=1
xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86_64) (revision id: 4aecf82)
211118 21:40:13  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/var/run/mysqld/mysqld.sock' as 'root'  (using password: YES).
211118 21:40:13  version_check Connected to MySQL server
211118 21:40:13  version_check Executing a version check against the server...
211118 21:40:13  version_check Done.
211118 21:40:13 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: /var/run/mysqld/mysqld.sock
Using server version 8.0.23-14.1
211118 21:40:13 Executing LOCK TABLES FOR BACKUP...
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
Number of pools: 1
xtrabackup: inititialize_service_handles suceeded
211118 21:40:14 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: /var/run/mysqld/mysqld.sock
xtrabackup: Redo Log Archiving is not set up.
Starting to parse redo log at lsn = 25204280
211118 21:40:14 >> log scanned up to (25234084)
xtrabackup: Generating a list of tablespaces
xtrabackup: Generating a list of tablespaces
Scanning './'
Completed space ID check of 2 files.
Allocated tablespace ID 1 for sys/sys_config, old maximum was 0
Using undo tablespace './undo_001'.
Using undo tablespace './undo_002'.
Opened 2 existing undo tablespaces.
211118 21:40:14 [01] Copying ./d10/attr_lang.ibd to /root/mm-bkp/test/d10/attr_lang.ibd
211118 21:40:14 [01]        ...done
211118 21:40:14 [01] Copying ./ibdata1 to /root/mm-bkp/test/ibdata1
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
211118 21:40:15 >> log scanned up to (25234084)
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Database page corruption detected at page 256, retrying...
[01] xtrabackup: Error: failed to read page after 10 retries. File ./ibdata1 seems to be corrupted.
[01] xtrabackup: Error: xtrabackup_copy_datafile() failed.
[01] xtrabackup: Error: failed to copy datafile.

Any idea what I’m doing wrong or what to try next? Any help appreciated.

1 Like

Run innochecksum with -v and make sure your MySQL server is NOT running.

1 Like