# Incremental backup with Xtrabackup

**URL:** <https://forums.percona.com/t/incremental-backup-with-xtrabackup/2144>\
**Category:** Percona XtraBackup\
**Created:** [May 2, 2011, 4:14am UTC](https://forums.percona.com/t/incremental-backup-with-xtrabackup/2144 "2011-05-02T04:14:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitzer70](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nitzer70](https://forums.percona.com/u/nitzer70)\
**Post date:** [May 2, 2011, 4:14am UTC](https://forums.percona.com/t/incremental-backup-with-xtrabackup/2144/1 "2011-05-02T04:14:14Z")

</div>

Hi,

I’m trying to use innobackupex and xtrabackup to make incremental backups but so far no luck.

First I created a full backup

innobackupex --password=xxxxx --no-lock --tmpdir=/tmp /data/backups/full/…innobackupex: Backup created in directory '/data/backups/full/2011-05-02\_02-13-49’110502 02:21:03 innobackupex: completed OK!

Everything went smoothly and I end up with a time stamped folder containing

I tried then to create a incremental backup based on this full back up

innobackupex --incremental --password=xxxxx --tmpdir=/tmp --no-lock --incremental-basedir=/data/backups/full/2011-05-02\_02-13-49/ incremental/…xtrabackup: The latest check point (for incremental): ‘245:3281249024’\>\> log scanned up to (245 3288192768)xtrabackup: Stopping log copying thread.xtrabackup: Transaction log of lsn (245 3257702458) to (245 3288192768) was copied.innobackupex: Backup created in directory ‘/data/backups/incremental/2011-05-02\_02-27-29’

So far everything looks ok  
delta files have been successfully created

When I try to apply those delta files to the full backup directory I get the following

xtrabackup --prepare --apply-log-only --target-dir=/data/backups/full/2011-05-02\_02-13-49/ --incremental-dir=/data/backups/incremental/2011-05-02\_02-27-29/xtrabackup: error: failed to read metadata from /data/backups/incremental/2011-05-02\_02-27-29//xtrabackup\_checkpoints

Any help would be really appreciated.

Thx in advance

---

<div class="post-metadata">

**Author:** ![Alanmoore](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Alanmoore](https://forums.percona.com/u/Alanmoore)\
**Post date:** [May 11, 2011, 10:36pm UTC](https://forums.percona.com/t/incremental-backup-with-xtrabackup/2144/2 "2011-05-11T22:36:14Z")

</div>

Please try this.It may sort out the problem.Hope this helps.

# xtrabackup --backup --target-dir=/full\_backups

To make changes to the database to take an incremental backup.

To take a incremental backup I ran the following:

# xtrabackup --backup --target-dir=/incremental --incremental-

basedir=/full\_backups

Preparing the full backup:

# xtrabackup --prepare --target-dir=/full\_backups

Applied incremental backup to the full backup.

# xtrabackup --prepare --target-dir=/full\_backups --incremental-dir=/

incremental

# innobackupex-1.5.1 --copy-back /full\_backups/

---

<div class="post-metadata">

**Author:** ![nitzer70](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nitzer70](https://forums.percona.com/u/nitzer70)\
**Post date:** [May 12, 2011, 1:09am UTC](https://forums.percona.com/t/incremental-backup-with-xtrabackup/2144/3 "2011-05-12T01:09:59Z")

</div>

Thx a lot for your answer. I finally figured it out and will post a full how to very soon.
