# History and prepare xtrabackup - nothing in database

**URL:** https://forums.percona.com/t/history-and-prepare-xtrabackup-nothing-in-database/18842
**Category:** Percona XtraBackup
**Created:** [November 30, 2022, 5:42pm UTC](https://forums.percona.com/t/history-and-prepare-xtrabackup-nothing-in-database/18842 "2022-11-30T17:42:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![stevene1900](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@stevene1900](https://forums.percona.com/u/stevene1900)
#### Post date: [November 30, 2022, 5:42pm UTC](https://forums.percona.com/t/history-and-prepare-xtrabackup-nothing-in-database/18842/1 "2022-11-30T17:42:24Z")

</div>

Does --history option only record data to database when the --backup option is specified?

I have tried using --history with --prepare and it seems like nothing is written to database, but I do see data that relates to when the --backup option was specified.

Unfortunately, in the output of xtrabackup, I do not see any confirmation or error about history being written to database.

This is my script:

xtrabackup --user=xxxx --password=xxxx --backup --target-dir=/backup --history=mysqlbackup  
xtrabackup --user=xxxx --password=xxxx --prepare --target-dir=/backup --history=mysqlbackup\_prep1  
xtrabackup --user=xxxx --password=xxxx --prepare --target-dir=/backup --history=mysqlbackup\_prep2

Thanks.

---

<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: [November 30, 2022, 6:30pm UTC](https://forums.percona.com/t/history-and-prepare-xtrabackup-nothing-in-database/18842/2 "2022-11-30T18:30:20Z")

</div>

According to the docs, it looks like it only takes a history when you use `--backup`
