# Full and Incremental backups are the same size

**URL:** <https://forums.percona.com/t/full-and-incremental-backups-are-the-same-size/7602>\
**Category:** Percona XtraBackup\
**Created:** [May 6, 2020, 11:01am UTC](https://forums.percona.com/t/full-and-incremental-backups-are-the-same-size/7602 "2020-05-06T11:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moncky](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@moncky](https://forums.percona.com/u/moncky)\
**Post date:** [May 6, 2020, 11:01am UTC](https://forums.percona.com/t/full-and-incremental-backups-are-the-same-size/7602/1 "2020-05-06T11:01:03Z")

</div>

I’m having an issue where by my incremental and full backups are the same size.I am taking a full backup like this:&nbsp;innobackupex --login-path=mylogin /mnt/backups/full\_backups --no-timestamp&nbsp; --parallel=${PARALLEL\_THREADS} --compress --compress-threads=${COMPRESSION\_THREADS}  
Once its complete I then do this to generate and xbstream file which is pushed up to S3 by another script:innobackupex --login-path=mylogin --stream=xbstream&nbsp; /mnt/backups/full\_backups/latest\_backup --parallel=${PARALLEL\_THREADS} --compress --compress-threads=${COMPRESSION\_THREADS} \> latest\_backup.xbstream  
Once every hour I also take an incremental backup, thuslyinnobackupex --login-path=mylogin --stream=xbstream --incremental /mnt/backups/incremental\_backups --incremental-basedir= /mnt/backups/full\_backups/latest\_backup --no-timestamp&nbsp; --parallel=${PARALLEL\_THREADS} --compress --compress-threads=${COMPRESSION\_THREADS} \> incremental\_backup.xbstream  
the incremental backup appears to also includ the full backup.&nbsp; I am beyond a doubt doing something wrong. but have been unable to work out what it is.  
If anyone can point me in the correct direction for doing this id appreciate itIn the end all I want is a Daily backup of my database in a compressed xbstream archive, with an hourly incremental where each incremental uses the daily as its base reference.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 7, 2020, 1:16am UTC](https://forums.percona.com/t/full-and-incremental-backups-are-the-same-size/7602/2 "2020-05-07T01:16:07Z")

</div>

Moncky,First, we would recommend you to use the xtrabackup command instead of the innobackupex command since innobackupex has been deprecated and removed in PXB version 8.0.Now with regards to the backup commands, you are missing the --extra-lsndir option to save the xtrabackup\_checkpoints file in the fullbackup directory. This file is read by xtrabackup during incremental backup to read at which LSN it will start backing up.I would suggest using this command to test:

> [@](#):
>
> xtrabackup --login-path=mylogin --stream=xbstream&nbsp;  
> –target-dir=/mnt/backups/full\_backups/latest\_backup --parallel=${PARALLEL\_THREADS}  
> –compress --compress-threads=${COMPRESSION\_THREADS} --extra-lsn=/mnt/backups/full\_backups/latest\_backup \>  
> latest\_backup.xbstream

Then incremental with:

> [@](#):
>
> xtrabackup --login-path=mylogin --stream=xbstream --target-dir=/mnt/backups/incremental\_backups --incremental-basedir=  
> /mnt/backups/full\_backups/latest\_backup&nbsp;  
> –parallel=${PARALLEL\_THREADS} --compress  
> –compress-threads=${COMPRESSION\_THREADS} --extra-lsndir=/mnt/backups/incremental\_backups \>  
> incremental\_backup.xbstream

The checkpoints file should look something like this on the full and incremental backup:

> [@](#):
>
> [root@psmysql8 ~]# cat backup/full/xtrabackup\_checkpoints  
> backup\_type = full-backuped  
> from\_lsn = 0  
> to\_lsn = 41480260  
> last\_lsn = 41480270  
> flushed\_lsn = 0  
> [root@psmysql8 ~]# cat backup/inc/xtrabackup\_checkpoints  
> backup\_type = incremental  
> from\_lsn = 41480260  
> to\_lsn = 41480290  
> last\_lsn = 41480300  
> flushed\_lsn = 0

Observe that on the full backup from\_lsn is 0 and on the incremental the backup starts on from\_lsn=41480260 which is the to\_lsn of the full backup. Another alternative to --extra-lsndir is the use of the --history flag - [The xtrabackup Option Reference - Percona XtraBackup](https://www.percona.com/doc/percona-xtrabackup/2.4/xtrabackup_bin/xbk_option_reference.html#cmdoption-xtrabackup-history)
