I have a question regarding the migration of our databases
I want to migrate from MySQL 5.7 to Percona 8.
In production we want a downtime as low as possible and i am unsure which way to choose.
Here the options i see right now
Percona XtraBackup, not possible as it only supports MySQL from version 8
Dump everything via MySQL dump and import the dump into a new Percona installation. This would take a few hours.
Set up new Percona installation as slave to MySQL 5.7 Server, Lock MySQL 5.7 and let Percona catch up. I am not sure if Percona can be a Slave to MySQL 5.7
Percona XtraBackup supports every version of MySQL going back to 5.5. Where did you read this that PXB only supports v8?
Correct. I suggest using mydumper/myloader instead as they are parallel in nature while mysqldump is not
Every newer version of MySQL is always backwards compatible via replication. Absolutely, a MySQL 8 can be a replica of a 5.7 source.
#3 is actually the best way to do this. Create a new MySQL server, install Percona MySQL 8, take a backup of your existing 5.7 using PXB, restore to new server, configure new as replica of 5.7 server, wait for catch up. Once catch up is done, set 5.7 to super_read_only=1, migrate applications to use v8 server, then shut down 5.7.
XtraBackup 2.4 will make copy of 5.7 data, but then you can start 8.0 server over that data directory,
the server will perform upgrade procedures in-place (after this you won’t be able to start 5.7 over that directory)
With XtraBackup you do not need to lock master for binary log positions, it will perform for you automatically trying to minimize the impact from locking
You do not need to lock the master when using xtrabackup. The binlog position can be found after the backup is complete, in the file xtraback_binlog_pos