Xtrabackup: File '/var/lib/mysql/binlog.000010' not found (OS errno 2 - No such file or directory)

I’m first time using percona Xtrabackups 8.0. And, while taking full backup with it, I see this error message at the end of log: Below command I used to take backup:

xtrabackup --backup --host=xx.xxx.xx.x --user=root --password=xxxx --target-dir=/home/taramaakijay049/backup --datadir=/var/lib/mysql

Detailed log:

https://ctxt.io/2/AABw5ztaEQ

That’s true that there’s no binlog.000010 at the moment. But, I’m not sure why is it looking for it and then throwing this error message. But, there are binlog1 to 9 files when I check the backup taken by xtrabackup in my backup folder, I don’t even see 1 to 9 files as well. Not sure, why it didn’t copy of rest my binlog files.

Also, here’s the output of show binary logs from source db:

mysql> show binary logs;
+---------------+-----------+-----------+
| Log_name      | File_size | Encrypted |
+---------------+-----------+-----------+
| binlog.000001 |       180 | No        |
| binlog.000002 |       404 | No        |
| binlog.000003 |       157 | No        |
| binlog.000004 |       180 | No        |
| binlog.000005 |       748 | No        |
| binlog.000006 |       392 | No        |
| binlog.000007 |       201 | No        |
| binlog.000008 |       201 | No        |
| binlog.000009 |       157 | No        |
+---------------+-----------+-----------+
9 rows in set (0.01 sec)

Additional info:

mysql> SELECT * FROM performance_schema.log_status\G
*************************** 1. row ***************************
    SERVER_UUID: 828049d5-c3f3-11ee-88bc-42010ab60004
          LOCAL: {"gtid_executed": "", "binary_log_file": "binlog.000006", "binary_log_position": 157}
    REPLICATION: {"channels": []}
STORAGE_ENGINES: {"InnoDB": {"LSN": 20509927, "LSN_checkpoint": 20509927}}
1 row in set (0.03 sec)

Hi Shiwangini_31,

From the logs I see you are using xtabackup version 8.0.35 on MySQL upstream 8.0.36

Starting with MySQL 8 , the used xtrabackup version should ideally be the same (or at least higher) than the MySQL/PS version used.

That said, you should either wait until xtrabackup 8.0.36 is released or stick with MySQL/PS 8.0.35 while using xtrabackup 8.0.35.

At this point I am not sure if the error is related to a mismatch version, bug or something else.
Can you reproduce the issue when using 8.0.35 ?
If you can provide a reproducible test case then we can fill a bug report

Regards

@Shiwangini_31,
Can you please compare these outputs:

SELECT * FROM performance_schema.log_status;
SHOW BINARY LOGS;

It looks like xtrabackup is trying to find a non-existent binlog, and/or a binlog that it does not have read permissions on.

It’s been some time, so binlog value has been increased up to .000046. But, as requested I’m sharing you output. I’m not certain whether it’s any permission problem:

mysql> SHOW BINARY LOGS;
+---------------+-----------+-----------+
| Log_name      | File_size | Encrypted |
+---------------+-----------+-----------+
| binlog.000011 |       201 | No        |
| binlog.000012 |       201 | No        |
| binlog.000013 |       201 | No        |
| binlog.000014 |       201 | No        |
| binlog.000015 |       201 | No        |
| binlog.000016 |       201 | No        |
| binlog.000017 |       201 | No        |
| binlog.000018 |       201 | No        |
| binlog.000019 |       201 | No        |
| binlog.000020 |       201 | No        |
| binlog.000021 |       201 | No        |
| binlog.000022 |       201 | No        |
| binlog.000023 |       201 | No        |
| binlog.000024 |       201 | No        |
| binlog.000025 |       201 | No        |
| binlog.000026 |       201 | No        |
| binlog.000027 |       201 | No        |
| binlog.000028 |       201 | No        |
| binlog.000029 |       201 | No        |
| binlog.000030 |       201 | No        |
| binlog.000031 |       201 | No        |
| binlog.000032 |       201 | No        |
| binlog.000033 |       201 | No        |
| binlog.000034 |       201 | No        |
| binlog.000035 |       201 | No        |
| binlog.000036 |       201 | No        |
| binlog.000037 |       201 | No        |
| binlog.000038 |       201 | No        |
| binlog.000039 |       201 | No        |
| binlog.000040 |       201 | No        |
| binlog.000041 |       201 | No        |
| binlog.000042 |       201 | No        |
| binlog.000043 |       201 | No        |
| binlog.000044 |       201 | No        |
| binlog.000045 |       201 | No        |
| binlog.000046 |       157 | No        |
+---------------+-----------+-----------+
36 rows in set (0.00 sec)

mysql> SELECT * FROM performance_schema.log_status;
+--------------------------------------+---------------------------------------------------------------------------------------+------------------+-----------------------------------------------------------+
| SERVER_UUID                          | LOCAL                                                                                 | REPLICATION      | STORAGE_ENGINES                                           |
+--------------------------------------+---------------------------------------------------------------------------------------+------------------+-----------------------------------------------------------+
| 828049d5-c3f3-11ee-88bc-42010ab60004 | {"gtid_executed": "", "binary_log_file": "binlog.000046", "binary_log_position": 157} | {"channels": []} | {"InnoDB": {"LSN": 20597128, "LSN_checkpoint": 20597128}} |
+--------------------------------------+---------------------------------------------------------------------------------------+------------------+-----------------------------------------------------------+
1 row in set (0.00 sec)


Bdw, not I’m getting the same error, but getting it for .000046 file.

Are you taking the backup on the same host? Or are you running it remotely?
The access to the logs has expired. Can you share the xtrabackup logs again?