Xtrabackup: copy_file() failed

I have a problem creating backup. Both Xtrabackup and Percona MySQL are hosted on separate servers.

These are the set of commands I used to create the backup user:

CREATE USER 'bkpuser'@'10.XXX.X.XX' IDENTIFIED BY 'XXX';
GRANT BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'bkpuser'@'10.XXX.X.XX';
GRANT SELECT ON performance_schema.log_status TO 'bkpuser'@'10.XXX.X.XX';
GRANT SELECT ON performance_schema.keyring_component_status TO bkpuser@'10.XXX.X.XX';
GRANT SELECT ON performance_schema.replication_group_members TO bkpuser@'10.XXX.X.XX';
FLUSH PRIVILEGES;

And this is what I run to create the backup:

xtrabackup --host=10.XXX.X.XX --user=bkpuser -p'XXX' --backup --compress --target-dir=/root/backup

I have attached the full log.
percona-log.txt (48.0 KB)

I do want to stress the fact that the file (/var/log/mysql/mysql-bin.009132) that xtrabackup complains that it doesn’t exist, does in fact exists.

Could you please help me with this issue? Thanks.

Percona Xtrabackup is a physical backup tool. You cannot create physical backups when running the backup from a separate machine. You must run PXB on the same host as MySQL.

1 Like

if your goal is to have a backup stored on another server, run the backup on MySQL node and use stream feature , use this link Streaming MySQL Backups with Percona XtraBackup - Another Alternative