# Xtrabackup constantly failing

**URL:** <https://forums.percona.com/t/xtrabackup-constantly-failing/18901>\
**Category:** Percona XtraBackup\
**Tags:** mysql, percona\
**Created:** [December 2, 2022, 5:38pm UTC](https://forums.percona.com/t/xtrabackup-constantly-failing/18901 "2022-12-02T17:38:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnwcarew](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/johnwcarew/32/6855_2.png) [@johnwcarew](https://forums.percona.com/u/johnwcarew)\
**Post date:** [December 2, 2022, 5:38pm UTC](https://forums.percona.com/t/xtrabackup-constantly-failing/18901/1 "2022-12-02T17:38:24Z")

</div>

We are constantly getting failed backups when the backup is run from a secondary server. How do we permanently fix this undo tablespace issue on the primary mysql server, so that the secondary doesn’t contain the undo tablespace error that is being reported.

MySQL: 8.0.28  
XtraBackup: 8.0.28-21

```auto
[Note] [MY-013252] [InnoDB] Using undo tablespace '/db/logs/undo/undo_001'.
[Note] [MY-012902] [InnoDB] Undo tablespace number 2 was being truncated when mysqld quit.
[ERROR] [MY-012903] [InnoDB] Cannot recover a truncated undo tablespace in read-only mode
[ERROR] [MY-011825] [Xtrabackup] xb_load_tablespaces() failed with error code 57

```

---

<div class="post-metadata">

**Author:** ![satya.bodapati](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/satya.bodapati/32/1322_2.png) [@satya.bodapati](https://forums.percona.com/u/satya.bodapati)\
**Post date:** [December 2, 2022, 9:09pm UTC](https://forums.percona.com/t/xtrabackup-constantly-failing/18901/2 "2022-12-02T21:09:17Z")

</div>

Hi @johnwcarew See this post. It should have a workaround for this problem

> [@Percona Xtrabackup Undo Log Truncation](https://forums.percona.com/t/percona-xtrabackup-undo-log-truncation/18307/2):
>
> Hi Jyothi, It looks like you are facing [[PXB-2702] Backup fails when undo truncation log is present - Percona JIRA](https://jira.percona.com/browse/PXB-2702) MySQL server is supposed to remove the undo\*\_trunc.log after resuming from crash. For some reason, it leaves this file (orphan). This confuses backup. We will be fixing in the upcoming release of PXB 8.0.30 As a workaround, you can try to rename them the undo\_trunc.log files in server data directory to undo\_trunc.log.backup(or any other extension except .log)
