# XtraBackup --compact and stream=tar compatibles with each other?

**URL:** <https://forums.percona.com/t/xtrabackup-compact-and-stream-tar-compatibles-with-each-other/5026>\
**Category:** Percona XtraBackup\
**Created:** [August 9, 2016, 2:37am UTC](https://forums.percona.com/t/xtrabackup-compact-and-stream-tar-compatibles-with-each-other/5026 "2016-08-09T02:37:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boadrius](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@Boadrius](https://forums.percona.com/u/Boadrius)\
**Post date:** [August 9, 2016, 2:37am UTC](https://forums.percona.com/t/xtrabackup-compact-and-stream-tar-compatibles-with-each-other/5026/1 "2016-08-09T02:37:22Z")

</div>

Hi everybody,

I’m using innobackupex and I want to perform a backup with --compact and --stream=tar options but when I restore this bak doesn’t work… and I don’t know why.  
It seems as if the secondary indexes didn’t create correctly before the retoration though I use the option ‘–rebuild-indexes’.

Backup command:

```auto
innobackupex --user=$db_user --password=$db_pass --compact --stream=tar ./ --no-timestamp | gzip - > $WORKING_DIR/$BCK_FILE

```

Restore command:

```auto
tar -zxif $src -C $TMP_DIR/database
innobackupex --apply-log --rebuild-indexes $TMP_DIR/database
innobackupex --copy-back $TMP_DIR/database

```

The return of the instruction --apply-log is always different from zero…

Anybody knows if this two methods are compatible with each other?  
Somebody could give an example with all the steps to be performed this kind of backup?

Thank you so much.

Best regards,

Boadrius
