Help. error: cannot open file /data/mysql/data/mysql1-bin.000022

When use this commond to backup a remote mysqlDB

xtrabackup --defaults-file=/etc/my.cnf --user=root --password=xxx --port=3306 --host= --backup --no-server-version-check --target-dir=/data/databak/base --stream=xbstream --compress --compress-threads=4 --parallel=4 --extra-lsndir=/data/databak/lsndir >
It occurred this error:
210513 18:07:07 Finished backing up non-InnoDB tables and files
210513 18:07:07 Executing FLUSH NO_WRITE_TO_BINLOG BINARY LOGS
210513 18:07:07 Selecting LSN and binary log position from p_s.log_status
xtrabackup: File ‘/data/mysql/data/mysql1-bin.000023’ not found (OS errno 2 - No such file or directory)
Operating system error number 2 in a file operation.
The error means the system cannot find the path specified.
If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
[00] error: cannot open file /data/mysql/data/mysql1-bin.000023
[00] Error: copy_file() failed.

What can i do now?

1 Like

XtraBackup must have direct, physical access to the same underlying filesystem as the database host and is typically not used remotely without some kind of network mounting of the remote filesystem. The typical use i that XxtraBackup must be installed directly on the same host as the server instance.

George O. Lorch III
Director of Server Engineering, Percona Server for MySQL, Percona XtraDB Cluster, and Percona XtraBackup

1 Like

According to your suggestion,The xtraBackup haved be installed directly on the same host with the mysql server instance, and fixed this error.


Xiao yang

1 Like