Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-1497

Xtrabackup not returning Error when there is failure

    XMLWordPrintable

    Details

      Description

      When there is error in taking backup of a table from bad tablespace, XtraBackup didn't produce error message at the end but reported "COMPLETED OK" and also RETURN CODE (echo $?) was 0. Proceeded with prepare and confirmed that the tablespace is lost and found only .frm under datadir for the reported table. We need to add Error message with the error RETURN CODE and so the DBA/automated jobs could identify the errors with their backup.

       

      Test to confirm that as below:

       

      Vinodhs-MBP:percona-server@5.6 vinodhkrish$ xtrabackup --backup -uroot --target-dir=/usr/local/mysqlbackup/databackup_7 > backup_7.log 2>&1
      Vinodhs-MBP:percona-server@5.6 vinodhkrish$ echo $?
      0
      Vinodhs-MBP:percona-server@5.6 vinodhkrish$ cat backup_7.log


      xtrabackup: Generating a list of tablespaces
      InnoDB: Allocated tablespace ID 2 for mysql/innodb_index_stats, old maximum was 0
      InnoDB: Space ID in fsp header is 117440512, but in the page header it is 2231369728.
      InnoDB: A bad Space ID was found in datafile: ./vinodh/testbackup.ibd, Space ID:18446744073709551615, Flags: 1073741824. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      180206 18:16:47 [01] Copying ./ibdata1 to /usr/local/mysqlbackup/databackup_7/ibdata1
      180206 18:16:47 [01] ...done


      180206 18:16:51 completed OK! 

       

       

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sergei.glushchenko Sergei Glushchenko
                  Reporter:
                  vinodh.krishnaswamy Vinodh Krishnaswamy
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Time Spent - 2 hours Remaining Estimate - 2 hours
                    2h
                    Logged:
                    Time Spent - 2 hours Remaining Estimate - 2 hours
                    2h