# Xtrabackup fails with errors on check point file

**URL:** <https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247>\
**Category:** Percona XtraBackup\
**Tags:** mysql, percona\
**Created:** [February 12, 2021, 10:41pm UTC](https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247 "2021-02-12T22:41:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajstark123](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@ajstark123](https://forums.percona.com/u/ajstark123)\
**Post date:** [February 12, 2021, 10:41pm UTC](https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247/1 "2021-02-12T22:41:06Z")

</div>

We are using Percona xtranackup version 24-2.4.20-1 to create a backup of a My SQL 5.7.29 database.

We have intermentent errors where xtraback fails to back up the database.

Does anybody know why this is happening.

The last failure occured fo4 this command.

- List item

xtrabackup --defaults-file=\<\<the\_db\_dir\>\>/db.cnf --host=localhost --user=\<\<the\_user\>\> --port=\<\<the\_port\> --password=\<\<the\_password\>\> --no-timestamp --backup --target-dir=\<\<the\_target\_dir\>\>/FULL

The errors we are getting

- xtrabackup: Error: cannot open \<\<the\_target\_dir\>\>/FULL//xtrabackup\_checkpoints
- xtrabackup: error: failed to read metadata from \<\<the\_target\_dir\>\>/FULL//xtrabackup\_checkpoints

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [February 15, 2021, 11:31am UTC](https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247/2 "2021-02-15T11:31:38Z")

</div>

Hi @ajstark123

This error means you are trying to prepare a backup from a target-dir that doesn’t contain a proper backup.

See below an example when I try to prepare a backup from an empty target-dir:

```auto
marcelo@marce-bld:~$ mkdir /tmp/backups/full/
marcelo@marce-bld:~$ /work/pxb/ins/2.4/bin/xtrabackup --prepare --target-dir=/tmp/backups/full --user=root --host=127.1 --port=3311
xtrabackup: recognized server arguments:
xtrabackup: recognized client arguments: --prepare=1 --target-dir=/tmp/backups/full --user=root --host=127.1 --port=3311
/work/pxb/ins/2.4/bin/xtrabackup version 2.4.20 based on MySQL server 5.7.26 Linux (x86_64) (revision id: 04f49bd0957)
xtrabackup: cd to /tmp/backups/full/
xtrabackup: Error: cannot open ./xtrabackup_checkpoints
xtrabackup: Error: failed to read metadata from './xtrabackup_checkpoints'

```

Please send us the full output of your xtrabackup prepare command, the output of xtrabackup when you originaly created this backup and the output of `ls` to list the files from target-dir.

---

<div class="post-metadata">

**Author:** ![ajstark123](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@ajstark123](https://forums.percona.com/u/ajstark123)\
**Post date:** [February 22, 2021, 9:28pm UTC](https://forums.percona.com/t/xtrabackup-fails-with-errors-on-check-point-file/9247/3 "2021-02-22T21:28:30Z")

</div>

We are getting the error when we are trying to create a backup. The prepare commad was not run.
