XtraBackup Restore Full Backup OK but I can't initialize mysqld I'm using XtraBackup mode Streaming and Compressing Backups to perform my backup on a MariaDB 10.19:

$ innobackupex --user=$db_user --password=$db_pass --compact --stream=tar ./ --no-timestamp | gzip - &gt; $WORKING_DIR/$BCK_FILE


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

...
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:

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
In Manual itself it is explained that


Decompress backup 

$ innobackupex --decompress /data/backup/2013-08-01_11-24-04/

When the files are uncompressed you can prepare the backup with the --apply-log option:

$ innobackupex --apply-log /data/backup/2013-08-01_11-24-04/



You should check for a confirmation message:

130802 02:51:02 innobackupex: completed OK!

Now the files in /data/backups/2013-08-01_11-24-04 is ready to be used by the server.