innobackupex --stream=xbstream

54 views
Skip to first unread message

Ron Johnson

unread,
Dec 16, 2016, 2:03:56 AM12/16/16
to Percona Discussion
Hi,

$ innobackupex --version
innobackupex version 2.3.5 Linux (x86_64) (revision id: 45cda89)

$ mysqld --version
mysqld  Ver 5.6.30-76.3-56 for Linux on x86_64 (Percona XtraDB Cluster (GPL), Release rel76.3, Revision aa929cb, WSREP version 25.16, wsrep_25.16)

The documentation mentions that full backups must be prepared, but doesn't mention how this is done with "innobackupex --stream=xbstream".

Does innobackupex automagically prepare the backup in this case?

Thanks

Jervin R

unread,
Dec 16, 2016, 2:51:32 AM12/16/16
to Percona Discussion
Ron,

The stream option, as aptly put, means the command by itself is not going to files on disk directly, it has to be piped and caught somewhere. You can either stream and extract from the other end like:

innobackupex --stream=xbstream . | ssh user@somehost "xbstream -x -C //path/to/dir"

You can then prepare the backup from the other end stored at /path/to/dir using --apply-log

Or store that stream into a file:

innobackupex --stream=xbstream . > /pth/to/backup.xbstream

And extract that with:

cat /pth/to/backup.xbstream | xbstream -x -C /path/to/backup/

Then prepare the extracted backup:

innobackupex --apply-log /path/to/backup/

You can find more examples here:

Ron Johnson

unread,
Dec 16, 2016, 4:52:27 AM12/16/16
to Percona Discussion
Thanks, Jarvis.  I did read that page.

The last example is "$ innobackupex --stream=tar ./ | bzip2 - > backup.tar.bz2".  What's the purpose of that if it's not transactionally consistent (or even corrupt)?
Reply all
Reply to author
Forward
0 new messages