xbsream can't create a files with -c

17 views
Skip to first unread message

Piotr Gbyliczek

unread,
Aug 10, 2017, 11:28:38 AM8/10/17
to Percona Discussion
Hi,

I'm trying to create a backup solution that would result in full and incremental backups. Backups could be compressed if chosen, so I thought using --stream=tar would be good for this reason.
This however does not agree with incrementals, as --stream=xbstream is required for that to work.

Now, using xbstream is fine, as I can add --compress rather than piping to gzip, but I have problem with incrementals then.  After creating a backup.xbstream file (redirected stream) in full backup directory, I need to extract xtrabackup_checkpoints file from it to get metadata for incremental backup. I simply can't get that done.

I've tried with :

xbstream  -c xtrabackup_checkpoints < /backup/full/backup.xbstream

This fails with :

xbstream: Can't get stat of 'xtrabackup_checkpoints' (Errcode: 2 - No such file or directory)

if I create the file with touch, I get :

XBSTCK01Extrabackup_checkpoints

and the file is still empty.

The only way I can get that file out is with -x, but that extracts whole dataset, which is not what I want.

To me, it looks like a bug in xbstream that does check file stats (presumably to avoid overwriting), but errors when it can't get stats on file, while that should confirm the file can be written.

Or is my understanding of that totally wrong, and I need to look at extracting and recording the to_lsn values myself in case of streaming ? 

Regards,
Piotr
Reply all
Reply to author
Forward
0 new messages