# New Cluster with data

**URL:** <https://forums.percona.com/t/new-cluster-with-data/12949>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [November 10, 2021, 7:24pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949 "2021-11-10T19:24:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 10, 2021, 7:24pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/1 "2021-11-10T19:24:33Z")

</div>

I am starting a new cluster after upgrading OS. The server has the data in the datadir can I start the cluster or will there be some sort of conflict?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 11, 2021, 3:03am UTC](https://forums.percona.com/t/new-cluster-with-data/12949/2 "2021-11-11T03:03:03Z")

</div>

Make sure that you bootstrap the first node and it will use the data in the datadir to form the first node of the cluster. Then start node2, and node3. They will join and SST if necessary.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 6:32pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/4 "2021-11-15T18:32:30Z")

</div>

I tried bootstrapping from my data but I am getting the following error. `Cannot boot server version 80023 on data directory built by version 80026. Downgrade is not supported mysqld: Can’t open file: ‘mysql.ibd’ (errno: 0 - )` I data in the datadir is from myswl 5.7 and I am trying to go to 8.0. How do start with the data I currently have, is there a file in the datadir that I can delete?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 15, 2021, 7:28pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/5 "2021-11-15T19:28:54Z")

</div>

According to the error you pasted, you are not on 5.7. You are on 8.0.26 “data directory built by version 80026” and you are trying to start 8.0.23 “Cannot boot server version 80023”

Once you start 8.0 on top of a 5.7, mysql automatically converts to the new data dictionary. Downgrade is impossible from 8.0 to 5.7. You must perform a complete 5.7-backup restore.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 7:39pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/6 "2021-11-15T19:39:51Z")

</div>

I am not trying to down grade from 8.0 to 5.7. My new server is 8.0, data in the datadir is from 5.7 I took down the 5.7 server but kept all of the data. I am bootstrapping the new cluster with data from 5.7 and I am getting the error` Cannot boot server version 80023 on data directory built by version 80026. Downgrade is not supported mysqld: Can’t open file: ‘mysql.ibd’ (errno: 0 - )`. Are there files I can remove in the datadir that will allow me to bootstrap the 8.0 instance with the 5.7 data.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 15, 2021, 7:53pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/7 "2021-11-15T19:53:35Z")

</div>

What you are saying and what MySQL is telling you are two different things. You are saying the datadir is 5.7, but mysql is telling you that is is NOT 5.7 and in fact it is an 8.0.26 datadir.

MySQL is reading your datadir and it is NOT a 5.7 datadir. It literally says so in the message:

```
data directory built by version 80026

```

Can you please install 8.0.26 and attempt to start MySQL?

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 8:01pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/8 "2021-11-15T20:01:07Z")

</div>

I am attempting to start mysql 8.0 here is what I get when I check the version. `mysql Ver 8.0.23-14.1 for Linux on x86_64 (Percona XtraDB Cluster (GPL), Release rel14, Revision d3b9a1d, WSREP version 26.4.3)`  
I copied the datadir from a mysql 5.7 install to the mysql 8.0 install. I setup the my.cnf file on mysql 8.0 and now I am attempting to start mysql 8.0 and  
I am getting ` Cannot boot server version 80023 on data directory built by version 80026. Downgrade is not supported mysqld: Can’t open file: ‘mysql.ibd’ (errno: 0 - )`  
Can I delete the mysql.ibd.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 15, 2021, 8:03pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/9 "2021-11-15T20:03:39Z")

</div>

Can you please install 8.0.26 and attempt to start MySQL?

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 8:34pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/10 "2021-11-15T20:34:57Z")

</div>

I am not certain I can install 8.0.26. The administrators had a difficult time getting 8.0.23 to install. Is there any reason why 8.0.23 wouldn’t work?  
I will ask for a fresh install because I am using an empty datadir and I am still getting the error.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 15, 2021, 9:24pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/11 "2021-11-15T21:24:40Z")

</div>

> [@danarashad](#):
>
> I will ask for a fresh install because I am using an empty datadir and I am still getting the error.

Ok, that is unusual. If MySQL does not see a proper datadir it will attempt to create one. Can you verify the datadir path settings in /etc/my.cnf and verify that path is empty?

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 10:05pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/12 "2021-11-15T22:05:36Z")

</div>

I am using Percona XtraDB Cluster if i use Percona Server 8.0.26 I would not have the ability to cluster. I do have the latest XtraDB Cluster, I will restore to my development area and do a mysql dump, those files should work once I get the datadir cleaned.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 15, 2021, 10:43pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/13 "2021-11-15T22:43:41Z")

</div>

Sorry, I did not realize PXC 8.0.26 was not available.

Do you have a backup from which you can restore? Or what about the other PXC nodes? The bottom line is that you cannot use this datadir; period. It flat out won’t work due to the version of the data dictionary. This is the error message you are getting and there is no way around this.

If you don’t have a backup, you need to install the latest Percona Server 8.0.26 so that it will start up, take a logical dump, stop and uninstall PS, erase data dir, install PXC 8.0.23 (which will create a proper 8.0.23 data dictionary), then import data.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 15, 2021, 11:52pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/14 "2021-11-15T23:52:37Z")

</div>

By logical dump you mean mysqldump? If so that is the route I am going.  
I do have backups, but if I extract them to the datadir wouldn’t that make it that datadir unusable because of the different versions?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 16, 2021, 1:22pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/15 "2021-11-16T13:22:05Z")

</div>

mysqldump is a logical backup which requires a running mysql server to restore. So if you start a brand new 8.0.23 (with empty datadir), this will initialize the datadir and create a proper 8.0.23 datadir. Then you can import your data. After that, stop the other two nodes. Then stop this node and restart it in bootstrap mode. Then start node2 and 3. They should SST from this node.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 16, 2021, 1:50pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/16 "2021-11-16T13:50:46Z")

</div>

I have a development server and I will extract and do a mysqldump, move dump to new server. Get a clean datadir start it up (hopefully it works) then restore my dump on the new server.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 17, 2021, 7:21pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/17 "2021-11-17T19:21:15Z")

</div>

I have a backup, can I extract and then ` xtrabackup --prepare --target-dir=directoryOfData` then `innobackupex --copy-back /path/to/BACKUP-DIR` all on the new node. Would that work? The datadir should I am guessing initialize the data to mysql 8?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 17, 2021, 7:32pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/18 "2021-11-17T19:32:14Z")

</div>

Stop using innobackupex completely. Everything is xtrabackup now, including copy-back function.

Your backup may contain the mysql system dictionary, which will probably put you in this same situation again. You really need to use a logical backup on a brand new install of PXC8.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 17, 2021, 7:45pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/19 "2021-11-17T19:45:12Z")

</div>

Noted. My databases are large so was trying to shortcut the extract, restore, dump process. My assumption was using `innobackupex now xtrabackup` to do the copy back, that it would prepare the directory for the newest version.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 17, 2021, 9:08pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/20 "2021-11-17T21:08:44Z")

</div>

I suspect what happened is that you installed Percona Server 8.0.26, which upgraded the existing datadir, then you installed PXC 8.0.23 which cannot read a datadir version 8.0.26. When this happens, the only option is to restore from logical backup as the physical backup taken by xtrabackup will have the 8.0.26 version datadir.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [November 18, 2021, 1:51pm UTC](https://forums.percona.com/t/new-cluster-with-data/12949/21 "2021-11-18T13:51:43Z")

</div>

I am guessing that is what the installers did.

[Next page](https://forums.percona.com/t/new-cluster-with-data/12949.md?page=2)
