Xtrabackup 8.0 error

I am switching from PXC 5.6 to PXC 8.0. The new 8.0 cluster is up I am working on a backup script. But I am running into errors.

xtrabackup --defaults-file=/etc/mysql/mysql.conf.d/mysqld.cnf --defaults-group=mysqld --socket=/var/run/mysqld/mysqld.sock --user=root --password=$pwd_value --backup --stream=xbstream --compress --target-dir=$dest 2> $log | gzip - | ssh mysql@backupserver "cat - > /data/mysql/$dest_folder/$backup_file"  > /dev/null 2>&1

Here is the error

xtrabackup: cd to /db1
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
Number of pools: 1
xtrabackup: inititialize_service_handles suceeded
Operating system error number 13 in a file operation.
The error means mysqld does not have the access rights to the directory.

I am unsure why mysqld doesn’t have the rights. Rights to which directory and how do i fix the issue?

1 Like

Make sure you are using xtrabackup v8 and not any previous version. Also make sure the OS user that you are logged in as has permissions to read the data files. The error message is a bit misleading. You may need to sudo to root before running xtrabackup.

1 Like