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

PXB fails to restore undo tablespace created during/before incremental backup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 8.0.6
    • Component/s: None
    • Labels:
      None

      Description

      Start MS8.0.14
      Add data in MS using sysbench
      Start creating undo tablespaces
      Take full backup with lock-ddl

      ./xtrabackup --user=root --password='' --backup --target-dir=${backup_dir}/full -S ${mysqldir}/socket.sock --datadir=${datadir} --lock-ddl

      Start a data load on the server using sysbench
      Take incremental backup with lock-ddl 

      ./xtrabackup --user=root --password='' --backup --target-dir=${backup_dir}/inc --incremental-basedir=${backup_dir}/full -S ${mysqldir}/socket.sock --datadir=${datadir} --lock-ddl

      Prepare the full backup

      ./xtrabackup --user=root --password='' --prepare --apply-log-only --target_dir=${backup_dir}/full

      Prepare the incremental backup

      ./xtrabackup --user=root --password='' --prepare --target_dir=${backup_dir}/full --incremental-dir=${backup_dir}/inc

      Prepare logs display the following error but gets completed

      Applying /home/mchawla/dbbackup_05_02_2019/inc//new_undo_4.ibu.delta to ./new_undo_4.ibu...
      xtrabackup: page size for /home/mchawla/dbbackup_05_02_2019/inc//new_undo_7.ibu.delta is 16384 bytes
      xtrabackup: Cannot open file ./new_undo_7.ibu
      xtrabackup: error: cannot open ./new_undo_7.ibu
      xtrabackup: Error: xtrabackup_apply_delta(): failed to apply /home/mchawla/dbbackup_05_02_2019/inc//new_undo_7.ibu.delta to ./new_undo_7.ibu.

      Stop the MS and move the data directory to another location
      Restore the backup

      ./xtrabackup --user=root --password='' --copy-back --target-dir=${backup_dir}/full --datadir=${datadir}

      Start the MS and view the undo tablespaces

      8.0.14>SELECT NAME, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME LIKE '%undo%';
      +-----------------+--------+
      | NAME | STATE |
      +-----------------+--------+
      | innodb_undo_001 | active |
      | innodb_undo_002 | active |
      | new_undo_1      | active |
      | new_undo_2      | active |
      | new_undo_3      | active |
      | new_undo_4      | active |
      | new_undo_5      | active |
      | new_undo_6      | active |
      | new_undo_7      | active |
      +-----------------+--------+

      In mysql logs, this message is displayed:

      2019-02-05T15:12:13.573530Z 12 [Warning] [MY-012111] [InnoDB] Trying to access missing tablespace 4294967271

      The undo tablespace file new_undo_7.ibu does not exist in data dir, it was not copied back by PXB during restore.

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned
                Reporter:
                manish.chawla Manish Chawla
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: