# \[Newbie\] Question about restore

**URL:** <https://forums.percona.com/t/newbie-question-about-restore/2115>\
**Category:** Percona XtraBackup\
**Created:** [January 11, 2011, 6:21am UTC](https://forums.percona.com/t/newbie-question-about-restore/2115 "2011-01-11T06:21:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschipperheyn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mschipperheyn/32/845_2.png) [@mschipperheyn](https://forums.percona.com/u/mschipperheyn)\
**Post date:** [January 11, 2011, 6:21am UTC](https://forums.percona.com/t/newbie-question-about-restore/2115/1 "2011-01-11T06:21:45Z")

</div>

Hi,

I’m testing xtrabackup and I have some problems restoring a database. Perhaps someone could give me some pointers.

First I use innobackupex-1.5.1 --copy-back to restore data. After that mysql stopped functioning. One thing I noticed is that innobackupex-1.5.1 copies everything in the backup directory, including xtrabackup specific files and increments to the /var/lib/mysql directory.

I then purged and reinstalled mysql and manually copied all the relevant files (ib\*,mysql/_,%mydb%/_. Now, through mysql workbench, I could see my database again, but not the tables within it. Although they are listed in the /var/lib/mysql/%mydb%

The reason is that by copying back, the permissions on the file were no longer owned by mysql

sudo chown -R mysql:mysql /var/lib/mysql

fixed that
