# Dump Directly from datadir

**URL:** <https://forums.percona.com/t/dump-directly-from-datadir/23466>\
**Category:** Percona XtraBackup\
**Created:** [July 9, 2023, 2:11am UTC](https://forums.percona.com/t/dump-directly-from-datadir/23466 "2023-07-09T02:11:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![praxis](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@praxis](https://forums.percona.com/u/praxis)\
**Post date:** [July 9, 2023, 2:11am UTC](https://forums.percona.com/t/dump-directly-from-datadir/23466/1 "2023-07-09T02:11:56Z")

</div>

Hello,

I have the datadir from a crashed server and I need to restore it on a new server. I’m looking at xtrabackup because I understand it can dump/backup directly from the datadir without an online server?

When I try to start the server (on new hardware), I get:

230709 1:54:15 InnoDB: Initializing buffer pool, size = 128.0M  
230709 1:54:15 InnoDB: Completed initialization of buffer pool  
InnoDB: Error: checksum mismatch in data file ./ibdata1

I’ve kept the default innodb conf on the new server, since I didn’t find any configs on the old server. Any suggestions would be much appreciated - basically if there’s someway to dump from offline innodb (I expect the myisam tables will work fine).

Much appreciated,

Hans

---

<div class="post-metadata">

**Author:** ![Denis\_Subbota](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/denis_subbota/32/23607_2.png) [@Denis\_Subbota](https://forums.percona.com/u/Denis_Subbota)\
**Post date:** [July 10, 2023, 8:15am UTC](https://forums.percona.com/t/dump-directly-from-datadir/23466/2 "2023-07-10T08:15:31Z")

</div>

Hello Praxis,

Xtrabackup can’t take backup from offline mysql server, hovewer it’s not required any backup tool to make it possible.  
All you need to accomplish this is to copy datadir to another server where you have same version of mysql as on source node, copy my.cnf + update **server\_id** , **log\_bin\_basename**  **log\_bin\_index**** relay\_log\_basename ****relay\_log\_indexand** maybe report\_host and report\_port variables in config, also you need to delete **auto.cnf** from datadir. After making these changes, you may start MySQL.

Regards,  
Denis Subbota.  
Managed Services, Percona.

---

<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:** [July 10, 2023, 3:07pm UTC](https://forums.percona.com/t/dump-directly-from-datadir/23466/3 "2023-07-10T15:07:14Z")

</div>

> [@praxis](#):
>
> xtrabackup because I understand it can dump/backup directly from the datadir without an online server

Hello @praxis,  
Where did you read this? PXB does indeed require a running MySQL server. PXB provides online, hot, backups. If you shut down MySQL, you can’t run PXB, but you don’t need to because MySQL is stopped. When MySQL is stopped, you can just copy the datadir to another machine. But that causes MySQL to be offline. PXB allows you to take a backup without shutting down MySQL.
