I am trying to backup mysql5.7 and restore it to mysql8.0, I did the following:
- start a percona-mysql-server-5.7 (5.7.42-46)container
- take backup of 5.7 instance using xtrabackup2.4
- copy the backup files to percona-mysql-server-8.0.31 container
- in 8.0.31 container, using xtrabackup8.0( 8.0.31-24 ) to restore the 5.7 backup
I got the following errors when doing “xtrabackup --prepare”
xtrabackup --prepare --target-dir=/tmp/backup/
Defaulted container "mysql" out of: mysql, mysql-sidecar, mysqld-exporter
xtrabackup: [Warning] option 'innodb_undo_tablespaces': unsigned value 0 adjusted to 2.
2023-06-30T05:00:12.351559-00:00 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_data_file_path=ibdata1:12M:autoextend --innodb_log_files_in_group=2 --innodb_log_file_size=50331648 --innodb_page_size=16384 --innodb_log_block_size=512 --innodb_undo_directory=./ --innodb_undo_tablespaces=0 --server-id=0
2023-06-30T05:00:12.352130-00:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --prepare=1 --target-dir=/tmp/backup/
xtrabackup version 8.0.31-24 based on MySQL server 8.0.31 Linux (x86_64) (revision id: f0754edb)
2023-06-30T05:00:12.352265-00:00 0 [Note] [MY-011825] [Xtrabackup] cd to /tmp/backup/
2023-06-30T05:00:12.352679-00:00 0 [Note] [MY-011825] [Xtrabackup] This target seems to be not prepared yet.
2023-06-30T05:00:12.356929-00:00 0 [ERROR] [MY-011825] [Xtrabackup] Unsupported redo log format 1
2023-06-30T05:00:12.356983-00:00 0 [ERROR] [MY-011825] [Xtrabackup] This version of Percona XtraBackup can only perform backups and restores against MySQL 8.0 and Percona Server 8.0, please use Percona Xtrabackup 2.4 for this database.
command terminated with exit code 1
It seems xtrabackup8.0 doesn’t have compatibility with mysql5.7, I checked the document , this should be supported