innobackupex / xtrabackup not working with stream when diverting STDERR

Bug #733663 reported by Nick Westerlund
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
High
Patrick Crews

Bug Description

Hi,

As reported here: http://mysqlgenie.com/wordpress/2011/03/xtrabackup-for-mysql-and-issues-with-streaming-mode/ , there is a problem when you separate STDOUT and STDERR inside a scripted backup solution for xtrabackup 1.5

a simple test case would be like this:

#!/bin/sh

innobackupex –backup ……. –stream=tar /path 1>/file.tar 2>/logfile.

Basically the problem is that if you separate STDOUT and STDERR, certain files doesnt show up (in our case, it was user-related tables from the mysql database), as well as xtrabackup_checkpoint and _logfiles. What was weird is that they are handled in the same way. and if duplicating the code that handles checkpoint and logfiles in innobackupex, they show up, but usually 1-3 times, rather than 2 as expected.

Unfortunately I am unable to share the actual source at this time, but the above information should be enough to reproduce this on RHEL5 with MySQL 5.1. Removing the split of stdout and stderr redirects solves the problem, but makes my dba annoyed that he cant log as usual.

Nothing special shows up in the logfile that stderr goes to, although I would have expected it to.

Revision history for this message
Dave Juntgen (djuntgen) wrote :

Ran into the same case.

innobackupex --user=root --password=XXXX --tmpdir=/db/db-trx/tmp --slave-info --stream=tar /db/backup/raw 2> backup.log | pv | nc newwcdb-logs 1979

when trying to restore:

110628 10:16:40 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find.
110628 10:16:40 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
  xtrabackup: Fatal error: cannot find ./xtrabackup_logfile.
xtrabackup: Error: xtrabackup_init_temp_log() failed.
innobackupex: Error:
innobackupex: ibbackup failed at /usr/local/bin/innobackupex line 336.

Stewart Smith (stewart)
Changed in percona-xtrabackup:
importance: Undecided → High
Changed in percona-xtrabackup:
assignee: nobody → Patrick Crews (patrick-crews)
Revision history for this message
Alexey Kopytov (akopytov) wrote :

It's not actually obvious that this bug is a duplicate of bug #514068. It must be re-verified when bug #514068 is fixed.

Revision history for this message
Patrick Crews (patrick-crews) wrote :

Wrote a test case for this that is passing perfectly. We split stderr and stdout in the test and restore + test the backup without a problem. Marking as a duplicate of 514068

Changed in percona-xtrabackup:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.