Migrate from percona server to pxc

Hello,

I’m planning to migrate from percona server to percona xtradb cluster. I’m currently using bin log replication in my percona server. Can I migrate to PXC first and later move to gtid or switch to gtid replication first and do the migration ?

Also, can I backup restore from Percona server to new PXC cluster of same version(8.0.39-30) using xtrabackup ? I did do the below steps but I could see the databases, please correct me if there is anything I missed

  1. Ran full xtrabackup and saved it in target directory
  2. Ran xtrabackup --prepare --target-dir=
  3. scp the backup target directory and files to pxc machine /data directory
  4. restarted pxc machine
  5. pxc machine started up normal, but mysql cli show databases, shows only information_schema,performance_schema,mysql,sys databases. And I can see other wsrep_cluster_status config parameters fine , wsrep_cluster_size is 2, wsrep_cluster_status primary

Thanks!

Is this the same path as configured in /etc/my.cnf?

Sounds like you have a misconfiguration. Run SELECT @@datadir to find the correct location for your backup.