# How to migrate MySQL 5.7 to Percona Server for MySQL 5.7 using Xtrabackup and replication?

**URL:** <https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753>\
**Category:** Percona XtraBackup\
**Tags:** mysql, percona\
**Created:** [January 24, 2023, 11:53am UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753 "2023-01-24T11:53:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtg](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gtg](https://forums.percona.com/u/gtg)\
**Post date:** [January 24, 2023, 11:53am UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753/1 "2023-01-24T11:53:33Z")

</div>

Hi everyone,

I’m trying to move a few MySQL 5.7 DBs to new servers and thought its a good time to switch to Percona Servers. I found this link: [Migrating from MySQL 5.7 to Percona MySQL 5.7 - #2 by vadimtk](https://forums.percona.com/t/migrating-from-mysql-5-7-to-percona-mysql-5-7/6443/2)

Does this work:

- Create a new server with MySQL 5.7
- Restore a copy of master DB using Xtrabackup
- Start new server as a slave replica
- Stop replication once the changes are caught up
- Stop MySQL
- Install Percona Server
- Point Percona Server to MySQL data directory
- Setup Percona Server as Master to Master replica?
- Point production app to new Percona Server

Thank you for any suggestions.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [January 24, 2023, 12:54pm UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753/2 "2023-01-24T12:54:02Z")

</div>

Hello gtg, welcome to Percona forum! the approach works fine but you can restore the backup directly with percona server. There’s no need to go with MySQL first:

- Create a new server with Percona 5.7
- Restore a copy of master DB using Xtrabackup
- Start new server as a slave replica
- Stop old server
- Point production app to new Percona Server

---

<div class="post-metadata">

**Author:** ![gtg](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@gtg](https://forums.percona.com/u/gtg)\
**Post date:** [January 24, 2023, 1:20pm UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753/3 "2023-01-24T13:20:58Z")

</div>

Hi Ivan,  
Thank you for the quick reply. That is good. I will skip installing MySQL.  
When I upgrade from Ubuntu 18.04 to 20.04, will Percona server get upgraded to 8 automatically?

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [January 24, 2023, 2:40pm UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753/4 "2023-01-24T14:40:50Z")

</div>

Hi, Percona Server will not be upgraded as part of OS upgrade. You will need to do that separately.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [January 24, 2023, 3:06pm UTC](https://forums.percona.com/t/how-to-migrate-mysql-5-7-to-percona-server-for-mysql-5-7-using-xtrabackup-and-replication/19753/5 "2023-01-24T15:06:06Z")

</div>


