# Using XtraBackup to consolidate

**URL:** <https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280>\
**Category:** Percona XtraBackup\
**Created:** [November 16, 2020, 7:38pm UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280 "2020-11-16T19:38:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcoshaw](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcoshaw/32/1346_2.png) [@marcoshaw](https://forums.percona.com/u/marcoshaw)\
**Post date:** [November 16, 2020, 7:38pm UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280/1 "2020-11-16T19:38:02Z")

</div>

I don’t have the versions of XtraBackup handy (if it might matter).

I’m thinking about consolidating a Percona 5.5 cluster with a newer Percona 5.7.

I want do take the 5.5 cluster offline (or quiesce it by offlining all clients), do an XtraBackup backup, then restore that in my 5.7 (then repoint my clients to the new DB cluster).

The thing perhaps is that this is a _consolidation_ meaning I have DBs A/B/C on 5.5 and X/Y/Z on 5.7. Excluding the users that I need to manually copy over, is this something XtraBackup can do, without blowing away my existing X/Y/Z DBs on 5.7?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [November 17, 2020, 4:36am UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280/2 "2020-11-17T04:36:53Z")

</div>

Hi Marcosshaw.

It’s doable with a few caveats:

1. In order to restore only A/B/C you will require to use selective restore approach of xtrabackup [https://www.percona.com/blog/2020/04/10/percona-xtrabackup-backup-and-restore-of-a-single-table-or-database/](https://www.percona.com/blog/2020/04/10/percona-xtrabackup-backup-and-restore-of-a-single-table-or-database/) . However, this requires --file-per-table which is not default in 5.5

2. The restore approach will require you to either perform it in parallel on all 5.7 nodes or leave only a single node in the cluster and force SST once to other nodes once you have finished.

3. You need to disable pxc\_strict\_mode .

If your 5.5 database is not too big, perhaps a logical backup will make more sense.

---

<div class="post-metadata">

**Author:** ![marcoshaw](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcoshaw/32/1346_2.png) [@marcoshaw](https://forums.percona.com/u/marcoshaw)\
**Post date:** [November 17, 2020, 5:27am UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280/3 "2020-11-17T05:27:56Z")

</div>

My 5.5 database is 1.5TB. It takes 3 hours to backup.

In general… Might it take roughly the same amount of time to complete a backup as it would be to complete a restore?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [November 17, 2020, 5:40am UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280/4 "2020-11-17T05:40:56Z")

</div>

I forgot a very important point on your scenario. You should never do a binary backup upgrade skipping a version, so the correct path in case you want to use xtrabackup would be 5.6 first then 5.7. In that case I would advise you to first upgrade to PXC 5.6, validate, upgrade to pxc 5.7, validate then backup and consolidate.

Talking about xtrabackup it all depends on the amount of transaction it has to replay on the restore.

---

<div class="post-metadata">

**Author:** ![marcoshaw](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcoshaw/32/1346_2.png) [@marcoshaw](https://forums.percona.com/u/marcoshaw)\
**Post date:** [November 17, 2020, 5:57am UTC](https://forums.percona.com/t/using-xtrabackup-to-consolidate/8280/5 "2020-11-17T05:57:06Z")

</div>

If I follow… You’re saying you do not recommend that I do my backup on 5.5 using XtraBackup, then do my restore on 5.7 using XtraBackup (different versions and all)?

You’re saying the backup/restore should not be done if I’m using different XtraBackup versions (and different PXC versions).

So… I guess it’s a “logical backup” after all.
