Solved

Error restore backup MySQL XtraBackup

  • 12 August 2022
  • 4 replies
  • 1068 views

Badge +1

When we try restore DB backup with XtraBackup we can show this error:

Error Code: [87:99] Description: Restoring Percona Xtrabackup database [~pki_2010~] failed. Reason:[~0xECCC065B:{XtraBackup::XtraBackupUtil::prepare(323)/ErrNo.1627.(Unknown error 1627)- Failed to run the command [/usr/bin/xtrabackup --prepare --export --target-dir="/var/lib/mysql/restore/pki_2010" ]. Error = [0xECCC065B:{XtraBackup::XtraBackupUtil::runXtraBackupCommand(119)/ErrNo.1627.(Unknown error 1627)-[xtrabackup: recognized client arguments: --prepare=1 --export=1 --target-dir=/var/lib/mysql/restore/pki_2010 /usr/bin/xtrabackup version 8.0.10 based on MySQL server 8.0.18 Linux (x86_64) (revision id: 94f9645) xtrabackup: auto-enabling --innodb-file-per-table due to the --export option xtrabackup: Can't change dir to '/var/lib/mysql/restore/pki_2010/' (OS errno 13 - Permission denied) xtrabackup: cannot my_setwd /var/lib/mysql/restore/pki_2010/ ]}]}~] Source: camgsmysql03, Process: MySqlRestore
 

Anything with the same problem or know this problem?

 

Thanks.

icon

Best answer by Mike Struening RETIRED 12 September 2022, 20:28

View original

4 replies

Userlevel 7
Badge +16

It seems that the user configured for the agent/restore isn't allowed to access the folder:
/var/lib/mysql/restore/pki_2010/

Error:

Can't change dir to '/var/lib/mysql/restore/pki_2010/' (OS errno 13 - Permission denied)

Can you check the user rights on this location?

Badge +1

Hi Jos,

User configures is “root” and dir “/var/lib/mysql/restore” have all permission:

total 36
drwxrwxrwx   2 root  root      6 Aug 12 11:18 restore
 

Folder “pki_2010” generates it during the restore because it is a database folder and “/var/lib/mysql/restore” is staging location.

Userlevel 7
Badge +23

@Error restore DB MySQL XtraBac I founbd the case you opened (220812-144) and will follow it.

If you want me to change your username, just send me a pm.

Userlevel 7
Badge +23

Looks like the case was closed:

Solution:

- Cross machine MySQL DB restore fails
- Both source nodes and target client has MySQL DB version 8.0.x and XtraBackup version 8.0
- Backup was taken from cluster client "CAME_xxxxxxxxx-backup" using XtraBackup feature, backup job used for restore # 1168386
- Could not see permissions, space, config, compatibility issue on target client

Escalated the case to Dev. Team internally who asked to increase the debug level [7] and file count for MySqlRestore.log on the target server and rerun a new restore, Backup Team suggested to close the case

Reply