# tokudb restore

**URL:** <https://forums.percona.com/t/tokudb-restore/7136>\
**Category:** Other MySQL® Questions\
**Created:** [July 25, 2019, 6:49am UTC](https://forums.percona.com/t/tokudb-restore/7136 "2019-07-25T06:49:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjengel11](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jjengel11](https://forums.percona.com/u/jjengel11)\
**Post date:** [July 25, 2019, 6:49am UTC](https://forums.percona.com/t/tokudb-restore/7136/1 "2019-07-25T06:49:01Z")

</div>

I am having no luck restoring from a tokudb backup. I am using tokudb version 5.7.23-24 on mysql 5.7.23-24 (centos 7.6). I’ve followed the docs on how to backup tokudb.

set tokudb\_backup\_dir=‘/data/backups’;

This backs up successfully. I rsync the files that the backup created in /data/backups/mysql\_data\_dir to the remote system under the my.cnf datadir directory and I also rsync’d the backup files in /data/backups/mysql\_log\_bin to the log\_bin directory on the remote system.

When I go to start mysql on the remote system it is just a continuous loop of restarting. The db never recovers and I see this in the log file

Checksum failure while reading header in file ./dbname/path\_to\_some\_file.tokudb.

I’ve tried multiple times to backup and restore and it never works.

There doesn’t seem to be much documentation on restoring tokudb. I imagine it should work like backing up and restoring an xtrabackup backup.

My ultimate goal is to setup a master slave environment.

Any pointers on the correct way to restore a tokudb backup would be most helpful.

---

<div class="post-metadata">

**Author:** ![jjengel11](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jjengel11](https://forums.percona.com/u/jjengel11)\
**Post date:** [July 25, 2019, 9:24am UTC](https://forums.percona.com/t/tokudb-restore/7136/2 "2019-07-25T09:24:54Z")

</div>

I am also running into this [URL][[PS-5193] TRACE logs on 56-5.6.42-rel84.2.el6.x86\_64 (possible due to tokudb?) - Percona JIRA](https://jira.percona.com/browse/PS-5193%5B/URL%5D)

I assume a database restart is needed to stop the excessive logging.

This tokudb is painful!

---

<div class="post-metadata">

**Author:** ![richardTam38](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@richardTam38](https://forums.percona.com/u/richardTam38)\
**Post date:** [April 6, 2021, 4:26am UTC](https://forums.percona.com/t/tokudb-restore/7136/3 "2021-04-06T04:26:04Z")

</div>

Hi, any luck sorting this out? Running into the same issue and wondering what we are supposed to do to get the server to start. Delete the files…? I should be able to restore the data from backups provided i can get the server started again…

---

<div class="post-metadata">

**Author:** ![jjengel11](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jjengel11](https://forums.percona.com/u/jjengel11)\
**Post date:** [April 6, 2021, 3:05pm UTC](https://forums.percona.com/t/tokudb-restore/7136/4 "2021-04-06T15:05:08Z")

</div>

> [@jjengel11](#):
>
> rect way to restore a tokudb backup would

So going back thru my notes, I think I noticed that /var was filling up with log messages from enabling tokudb backup.

A restart did not work as the logs were still going crazy. I tried this command but it didn’t work

```auto
sudo ps_tokudb_admin --disable-backup -u root -p

```

What I had to do to solve my issue was to remove this from /etc/my.cnf

```auto
[mysqld_safe]
preload-hotbackup

```

and then restart mysql. Hopefully this helps

---

<div class="post-metadata">

**Author:** ![jjengel11](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jjengel11](https://forums.percona.com/u/jjengel11)\
**Post date:** [April 6, 2021, 3:09pm UTC](https://forums.percona.com/t/tokudb-restore/7136/5 "2021-04-06T15:09:18Z")

</div>

> [@jjengel11](#):
>
> eem to be much documentation

Actually not sure if what I just mentioned will help you. What I have in my notes is more to the logging issue and not the restore issue.

I do see that I was never able to restore and configure mysql in a master/slave with tokudb ☹

---

<div class="post-metadata">

**Author:** ![richardTam38](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@richardTam38](https://forums.percona.com/u/richardTam38)\
**Post date:** [April 7, 2021, 4:18am UTC](https://forums.percona.com/t/tokudb-restore/7136/6 "2021-04-07T04:18:23Z")

</div>

Hi, thanks for the response. I suspect i have an actual issue with corrupted data and that won’t help me start the server.  
I am getting errors like this:

> Checksum failure while reading header in file: {filename}.tokudb

According to [this presentation,](https://www.percona.com/sites/default/files/presentations/13-TokuDB.pdf) checksum issues are not recoverable… so i guess its start again, and slowly restore data from backups.  
I’m beginning to think TokuDB is just not worth the engineering hassle for my applications…

Cheers
