# Sometimes Problem with rights in de Data Dir after restoring a xtrabackup

**URL:** <https://forums.percona.com/t/sometimes-problem-with-rights-in-de-data-dir-after-restoring-a-xtrabackup/35594>\
**Category:** Percona XtraBackup\
**Created:** [December 11, 2024, 9:07am UTC](https://forums.percona.com/t/sometimes-problem-with-rights-in-de-data-dir-after-restoring-a-xtrabackup/35594 "2024-12-11T09:07:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Totto](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@Totto](https://forums.percona.com/u/Totto)\
**Post date:** [December 11, 2024, 9:07am UTC](https://forums.percona.com/t/sometimes-problem-with-rights-in-de-data-dir-after-restoring-a-xtrabackup/35594/1 "2024-12-11T09:07:15Z")

</div>

Hello together, I have a small problem with the Xtrabackup from percona. Sometimes it happens that iI have problkems with the rights for Data in the Data dir afert restoring a backup. It happens not everytime so i have no clue where the error happens. Any suggestions where I can start for searching?

---

<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:** [December 11, 2024, 12:46pm UTC](https://forums.percona.com/t/sometimes-problem-with-rights-in-de-data-dir-after-restoring-a-xtrabackup/35594/2 "2024-12-11T12:46:43Z")

</div>

Hello @Totto,  
This is normal behavior. One of the required steps when restoring a backup is to fix file permissions. Here’s a high-level example set of steps:

```auto
# cd /path/to/backup
# xtrabackup --prepare
# xtrabackup --copy-back --target-dir /var/lib/mysql
# chown -R mysql:mysql /var/lib/mysql
# systemctl start mysql

```
