# Is this a bug of Xtrabackup 8.0.23-16 and MySQL 8.0.23,when I executed --copy-back, there was an error in the index file of binlog

**URL:** <https://forums.percona.com/t/is-this-a-bug-of-xtrabackup-8-0-23-16-and-mysql-8-0-23-when-i-executed-copy-back-there-was-an-error-in-the-index-file-of-binlog/10472>\
**Category:** Percona XtraBackup\
**Tags:** percona\
**Created:** [May 15, 2021, 8:45am UTC](https://forums.percona.com/t/is-this-a-bug-of-xtrabackup-8-0-23-16-and-mysql-8-0-23-when-i-executed-copy-back-there-was-an-error-in-the-index-file-of-binlog/10472 "2021-05-15T08:45:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yangdada](https://avatars.discourse-cdn.com/v4/letter/y/4bbf92/32.png) [@yangdada](https://forums.percona.com/u/yangdada)\
**Post date:** [May 15, 2021, 8:45am UTC](https://forums.percona.com/t/is-this-a-bug-of-xtrabackup-8-0-23-16-and-mysql-8-0-23-when-i-executed-copy-back-there-was-an-error-in-the-index-file-of-binlog/10472/1 "2021-05-15T08:45:05Z")

</div>

Xtrabackup version：8.0.23-16  
MySQL version ：8.0.23 Community

my.cnf include the following information about：

```auto
[root@192 data]# cat /etc/my.cnf |grep 'log-bin\|datadir'
datadir	= /data/mysql
log-bin = /data/mysql/mybinlog

```

1.do backup

2.do prepare  
prepare is ok ， and I get the following values like :

```auto
[root@192 backup]# cat xtra_full_20210515160208/mybinlog.index
/data/mysql/mybinlog.000005

```

1. copy-back

```auto
xtrabackup --defaults-file=/etc/my.cnf --copy-back --target-dir=/data/backup/xtra_full_20210515160208/

```

When I finished executing --copy-back, I found that there was a problem,The index file of binlog is missing some information，When I change it to mybinlog.000005，MySQL can be started normally。

```auto
[root@192 ~]# cat /data/mysql/mybinlog.index 
/data/mysql/.000005

```

---

<div class="post-metadata">

**Author:** ![Rahul\_Malik](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rahul_malik/32/3580_2.png) [@Rahul\_Malik](https://forums.percona.com/u/Rahul_Malik)\
**Post date:** [May 21, 2021, 10:55am UTC](https://forums.percona.com/t/is-this-a-bug-of-xtrabackup-8-0-23-16-and-mysql-8-0-23-when-i-executed-copy-back-there-was-an-error-in-the-index-file-of-binlog/10472/2 "2021-05-21T10:55:08Z")

</div>

thanks @yangdada for reporting. We have verified it as bug.  
The workaroud is by avoiding the absolute path in log-bin. just use filename if possible.

---

<div class="post-metadata">

**Author:** ![Rahul\_Malik](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rahul_malik/32/3580_2.png) [@Rahul\_Malik](https://forums.percona.com/u/Rahul_Malik)\
**Post date:** [May 21, 2021, 1:58pm UTC](https://forums.percona.com/t/is-this-a-bug-of-xtrabackup-8-0-23-16-and-mysql-8-0-23-when-i-executed-copy-back-there-was-an-error-in-the-index-file-of-binlog/10472/3 "2021-05-21T13:58:32Z")

</div>

you can track [[PXB-2510] copy-back is not restoring binlog file properly when absolute path in used in log-bin - Percona JIRA](https://jira.percona.com/browse/PXB-2510) to know to progress on this bug.
