cannot extract innobackupex created tar files even with -i

Bug #607779 reported by Marc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
High
Aleksandr Kuzminsky

Bug Description

I'm trying to create a backup on a compressed tar file with innobackupex. I'm using the following commandline:

[mysql-backup]$ innobackupex-1.5.1 --user XXXX --password YYYY --slave-info --stream=tar ./ | gzip - > backup.tar.gz

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy.
All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex-1.5.1
           prints "completed OK!".

innobackupex-1.5.1: Using mysql Ver 14.14 Distrib 5.1.47, for unknown-linux-gnu (x86_64) using readline 5.1
innobackupex-1.5.1: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

innobackupex-1.5.1: Created backup directory /mysql-backup
100720 14:36:32 innobackupex-1.5.1: Starting mysql with options: --password=YYYY --user=XXXX --unbuffered --
100720 14:36:32 innobackupex-1.5.1: Connected to database with mysql child process (pid=10490)
100720 14:36:40 innobackupex-1.5.1: Connection to database server closed
100720 14:36:40 innobackupex-1.5.1: Starting mysql with options: --password=YYYY --user=XXXX --unbuffered --
100720 14:36:40 innobackupex-1.5.1: Connected to database with mysql child process (pid=10619)
100720 14:36:44 innobackupex-1.5.1: Connection to database server closed

100720 14:36:44 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup --backup --suspend-at-end --log-stream --target-dir=./
innobackupex-1.5.1: Waiting for ibbackup (pid=10671) to suspend
innobackupex-1.5.1: Suspend file '/var/lib/mysql/xtrabackup_suspended'

xtrabackup: suspend-at-end is enabled.
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = /var/lib/mysql/
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /var/lib/mysql-log/
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 1073741824
xtrabackup: Stream mode.
>> log scanned up to (87314155026)

100720 14:36:46 innobackupex-1.5.1: Continuing after ibbackup has suspended

innobackupex-1.5.1: Starting to backup InnoDB tables and indexes
innobackupex-1.5.1: from original InnoDB data directory '/var/lib/mysql/'
innobackupex-1.5.1: Backing up as tar stream 'ibdata1'
>> log scanned up to (87314155026)
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/ad.ibd'
>> log scanned up to (87314155026)
>> log scanned up to (87314155026)
>> log scanned up to (87314155026)
>> log scanned up to (87314155026)
>> log scanned up to (87314155026)
....
>> log scanned up to (87314155920)
>> log scanned up to (87314155920)
>> log scanned up to (87314155920)
>> log scanned up to (87314155920)
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/blog.ibd'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/system_values.ibd'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/ad.ibd'
>> log scanned up to (87314155920)
>> log scanned up to (87314155920)
>> log scanned up to (87314155920)
....
 log scanned up to (87318487031)
>> log scanned up to (87318487031)
>> log scanned up to (87318487031)
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/blog.ibd'
>> log scanned up to (87318487031)
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/system_values.ibd'
100720 15:09:47 innobackupex-1.5.1: Starting mysql with options: --password=syfDnn1pc --user=root --unbuffered --
100720 15:09:47 innobackupex-1.5.1: Connected to database with mysql child process (pid=11342)
>> log scanned up to (87318487031)
100720 15:09:51 innobackupex-1.5.1: Starting to lock all tables...
>> log scanned up to (87318487031)
>> log scanned up to (87318487031)
100720 15:10:03 innobackupex-1.5.1: All tables locked and flushed to disk

100720 15:10:03 innobackupex-1.5.1: Starting to backup .frm, .MRG, .MYD, .MYI,
innobackupex-1.5.1: .TRG, .TRN, .ARM, .ARZ and .opt files in
innobackupex-1.5.1: subdirectories of '/var/lib/mysql'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/ad.frm'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/db.opt'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/system_values.frm'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate_int/blog.frm'
innobackupex-1.5.1: Backing up files '/var/lib/mysql/mysql/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,opt,par}' (65 files)
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/ad.frm'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/db.opt'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/system_values.frm'
innobackupex-1.5.1: Backing up file '/var/lib/mysql/real_estate/blog.frm'
100720 15:10:04 innobackupex-1.5.1: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ and .opt files

innobackupex-1.5.1: Resuming ibbackup

xtrabackup: The latest check point (for incremental): '87318487031'
>> log scanned up to (87318487031)
xtrabackup: Transaction log of lsn (87314155026) to (87318487031) was copied.
100720 15:10:06 innobackupex-1.5.1: All tables unlocked
100720 15:10:06 innobackupex-1.5.1: Connection to database server closed

innobackupex-1.5.1: Backup created in directory '/mysql-backup'
innobackupex-1.5.1: MySQL binlog position: filename '', position
innobackupex-1.5.1: MySQL slave binlog position: master host 'dooku', filename 'binlog.002407', position 217768049
innobackupex-1.5.1: You must use -i (--ignore-zeros) option for extraction of the tar stream.
100720 15:10:06 innobackupex-1.5.1: completed OK!

So, everything looks righ. But when I try to uncompress the resulting tar file, a lot of errors appear. Here is the tar i do to check the file (using t option):

mysql-backup]$ tar itvfz backup.tar.gz
-rw-r--r-- root/root 294 2010-07-20 14:36:32 backup-my.cnf
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Archive contains `"\000 \017 Q\034\223\332\023' where numeric off_t value expected
tar: Archive contains `\023\000\000\000\000\031V' where numeric mode_t value expected
tar: Archive contains `\223\340\023\000\000\000\000\031' where numeric major_t value expected
tar: Archive contains `V\000\0005\034\364\b\200' where numeric minor_t value expected
tar: Archive contains `\00047' where numeric uid_t value expected
tar: Archive contains `\000\004\362\213\226\002' where numeric gid_t value expected
tar: Archive contains `\00047' where numeric uid_t value expected
tar: Archive contains `\000\004\362\213\226\002' where numeric gid_t value expected
-rwsrwsrwt 4294967295/4294967295 18446744073709551615 1970-01-01 01:00:00 \326\023
tar: Skipping to next header
tar: Archive contains `\b\200\000\000\000\005|9\274\001\033\004' where numeric off_t value expected
tar: Archive contains `\004f.$E\025\370\026' where numeric mode_t value expected
tar: Archive contains `\232Y$E\026\033\026a\034\235\246\020' where numeric time_t value expected
tar: Archive contains `\000\005\300\r\315\b' where numeric major_t value expected
tar: Archive contains `>\034\235\245\020\000\000\001' where numeric uid_t value expected
tar: Archive contains `n%%\000\003\0026\323' where numeric gid_t value expected
tar: Archive contains `>\034\235\245\020\000\000\001' where numeric uid_t value expected
tar: Archive contains `n%%\000\003\0026\323' where numeric gid_t value expected
drwsrwsrwt 4294967295/4294967295 18446744073709551615 1970-01-01 00:59:59 \025\217\025\325\034\235\242\020
tar: Skipping to next header
tar: Archive contains `D\'\361(=\034\214' where numeric mode_t value expected
tar: Archive contains `P$E(\027(`\034\214\001\020' where numeric time_t value expected
tar: Archive contains `\0005\001\020' where numeric major_t value expected
tar: Archive contains `\000\005s\205X\001\033' where numeric minor_t value expected
tar: Archive contains `\020\000\000\001n"O\340' where numeric uid_t value expected
tar: Archive contains `\020\000\000\001n"O\340' where numeric uid_t value expected
?rwsrwsrwt 4294967295/857602824 396198281964356608 1970-01-01 00:59:59 \020 unknown file type `\''
....

If I try to extract it, lots of files with unprintable names are created.

Without the -i option, the tar do not complains, but stops after the first file. (I presume that's the purpose of the -i option, skip the 0 as EOFs).

Is my tar executable incompatible? I'm Using a CentOS 5.4 wich have a tar (GNU tar) version 1.15.1
.

Revision history for this message
Percona (percona-team) wrote :

Alexandr,

Please check if it was fixed in latest commits.

Also please checks to test suite.

Changed in percona-xtrabackup:
assignee: nobody → Aleksandr Kuzminsky (akuzminsky)
milestone: none → 1.3.1
status: New → Triaged
importance: Undecided → High
Percona (percona-team)
Changed in percona-xtrabackup:
status: Triaged → Fix Released
Changed in percona-xtrabackup:
status: Fix Released → Confirmed
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
mdiianni (mdiianni) wrote :

Hi all,

I'm currently using:

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

And:

percona-xtrabackup-2.0.3-470.rhel5

And the issue is still happening when I extract the tar file:

time /usr/bin/innobackupex --user=myuser --password=mypass --no-timestamp --slave-info --socket=/tmp/mysql.sock --defaults-file=/usr/local/mysql/my.cnf --stream=tar /disk2/mysql-data/ | ssh myserver "tar -C /disk2/mysql-data/ -xif -"

>> log scanned up to (3896221341397)
>> log scanned up to (3896221341407)
>> log scanned up to (3896221341437)
>> log scanned up to (3896221341447)
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Substituting `.' for empty member name
tar: .: Cannot open: Is a directory
tar: Skipping to next header
tar: Archive contains `\335\000\212\330\030\376\004\200\000R\032\003' where numeric off_t value expected
tar: Archive contains `\362\000\000\212\331(\266' where numeric mode_t value expected
tar: Archive contains `\217\271;\001\004\004\200\000\036\201(q' where numeric time_t value expected
tar: Archive value -39406496044744704 is out of major_t range -2147483648.2147483647
tar: Archive contains `\000\212\331(\024(\224' where numeric uid_t value expected
tar: Archive contains `\000\205;\000\004$.' where numeric gid_t value expected
tar: ÿK: implausibly old time stamp 1970-01-01 00:59:59
tar: Skipping to next header
>> log scanned up to (3896221341467)
tar: Archive contains `\000\215\t$\037$\244\034\000\205' where numeric off_t value expected
tar: Archive contains `\000$' where numeric mode_t value expected
tar: Archive contains `\004\033\026j\332\000\215\t#q\004\200' where numeric time_t value expected
tar: Archive contains `\004\033\026k\020' where numeric major_t value expected
tar: Archive contains `\004\033\026k\021\000\000%' where numeric minor_t value expected
tar: Archive contains `\375\000\000\215\t$\306' where numeric gid_t value expected
tar: \004\033\026j\347: Unknown file type '', extracted as normal file
tar: ç: implausibly old time stamp 1970-01-01 00:59:59
tar: Skipping to next header
tar: Removing leading `/' from member names
tar: : implausibly old time stamp 1970-01-01 01:00:00
tar: Skipping to next header
tar: Skipping to next header
tar: Skipping to next header
tar: Skipping to next header

Revision history for this message
mdiianni (mdiianni) wrote :

The issue also happens using xbstream.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Does the problem occur without --slave-info? What's the error message when using xbstream? Please also report this as a separate bug (and post the answers there). Thank you.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-283

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.