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

**URL:** <https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713>\
**Category:** Percona XtraBackup\
**Created:** [February 25, 2024, 5:07pm UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713 "2024-02-25T17:07:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiwangini\_31](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shiwangini_31/32/11040_2.png) [@Shiwangini\_31](https://forums.percona.com/u/Shiwangini_31)\
**Post date:** [February 25, 2024, 5:07pm UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713/1 "2024-02-25T17:07:17Z")

</div>

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:

```auto
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](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:

```auto
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:

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![CTutte](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ctutte/32/1341_2.png) [@CTutte](https://forums.percona.com/u/CTutte)\
**Post date:** [February 26, 2024, 1:54pm UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713/2 "2024-02-26T13:54:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 26, 2024, 4:56pm UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713/3 "2024-02-26T16:56:58Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Shiwangini\_31](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shiwangini_31/32/11040_2.png) [@Shiwangini\_31](https://forums.percona.com/u/Shiwangini_31)\
**Post date:** [March 10, 2024, 6:58pm UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713/4 "2024-03-10T18:58:15Z")

</div>

> [@CTutte](#):
>
> xtrabackup 8.0.35

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [March 14, 2024, 2:51am UTC](https://forums.percona.com/t/xtrabackup-file-var-lib-mysql-binlog-000010-not-found-os-errno-2-no-such-file-or-directory/28713/5 "2024-03-14T02:51:26Z")

</div>

> [@Shiwangini\_31](#):
>
> `--host=xx.xxx.xx.x`

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?
