# How to prepare Streaming and Compressing Backups and Log Sequence Error

**URL:** <https://forums.percona.com/t/how-to-prepare-streaming-and-compressing-backups-and-log-sequence-error/5014>\
**Category:** Percona XtraBackup\
**Created:** [August 3, 2016, 1:30am UTC](https://forums.percona.com/t/how-to-prepare-streaming-and-compressing-backups-and-log-sequence-error/5014 "2016-08-03T01:30:16Z")\
**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 3, 2016, 1:30am UTC](https://forums.percona.com/t/how-to-prepare-streaming-and-compressing-backups-and-log-sequence-error/5014/1 "2016-08-03T01:30:16Z")

</div>

Hi everybody,

I’m using Streaming and Compressing Backups to perform my backup on a MariaDB 10.19:

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

```

All seems ok even when I restore the backup, innobackup output shows:

```auto
...
innobackupex: Finished copying back files.

160801 13:52:31 innobackupex: completed OK!

```

but when I start the mysqld I find the next message in its log:

```auto
2016-08-01 15:52:33 7f08d8ed87c0 InnoDB: Error: page 371 log sequence number 2340146
InnoDB: is in the future! Current system log sequence number 2337804.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
...
a lot of times!

```

In some cases I can’t initialize the mysql.

On the page 23 of the manual ‘PerconaXtraBackup-2.1.9.pdf’ you can read:  
‘Note that the streamed backup will need to be prepared before restoration. Streaming mode does not prepare the backup.’

I have no idea of how prepare the backup before the restoration in this situation.  
In the manual explains how prepare it using --apply-log argument but the backups aren’t performed using stream and compressing mode.

Anybody knows how prepare it correctly?  
How can I retore it?  
Should I use the --apply-log to prepare it? How?

Thanks for your time.

Best rgrds,  
Boadrius
