Applying incremental backup cannot treat databases/tables created aftrer the previous backup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
This is reported by Keith Murphy:
Now the problem occurs when I prepare this incremental backup:
-bash-3.2$ xtrabackup --prepare --target-
incremental-
xtrabackup Ver rc-0.7 for 5.0.83 unknown-linux-gnu (x86_64)
incremental backup from 0:372733003 is enabled.
xtrabackup: cd to /backups/
xtrabackup: This target seems to be already prepared.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(0
738789408)
Applying /backups/
Applying /backups/
Applying /backups/
film_category.
Applying /backups/
customer.ibd.delta ...
Applying /backups/
Applying /backups/
Applying /backups/
Applying /backups/
category.ibd.delta ...
Applying /backups/
Applying /backups/
Applying /backups/
Applying /backups/
Applying /backups/
inventory.ibd.delta ...
Applying /backups/
film_actor.
Applying /backups/
Applying /backups/
language.ibd.delta ...
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
titles.ibd
xtrabackup: Error: xtrabackup_
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
salaries.ibd
xtrabackup: Error: xtrabackup_
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
employees.ibd
xtrabackup: Error: xtrabackup_
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
dept_manager.ibd
xtrabackup: Error: xtrabackup_
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
departments.ibd
xtrabackup: Error: xtrabackup_
090713 13:33:24 InnoDB: Operating system error number 2 in a file
operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: error: cannot open /backups/
dept_emp.ibd
xtrabackup: Error: xtrabackup_
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
incremenatal_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory
parameter)
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
090713 13:33:25 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
090713 13:33:25 InnoDB: Error: table 'employees/
InnoDB: in InnoDB data dictionary has tablespace id 23,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
090713 13:33:25 InnoDB: Error: table 'employees/
InnoDB: in InnoDB data dictionary has tablespace id 25,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
090713 13:33:25 InnoDB: Error: table 'employees/
InnoDB: in InnoDB data dictionary has tablespace id 24,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
090713 13:33:25 InnoDB: Error: table 'employees/
InnoDB: in InnoDB data dictionary has tablespace id 22,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
090713 13:33:25 InnoDB: Error: table 'employees/
InnoDB: in InnoDB data dictionary has tablespace id 27,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
090713 13:33:25 InnoDB: Error: table 'employees/titles'
InnoDB: in InnoDB data dictionary has tablespace id 26,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://
InnoDB: for how to resolve the issue.
InnoDB: Last MySQL binlog file position 0 340049538, file name ./mysql-
bin.000003
090713 13:33:25 InnoDB: Started; log sequence number 0 738789408
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 340049538, file name ./mysql-
bin.000003
xtrabackup: starting shutdown with innodb_
090713 13:33:25 InnoDB: Starting shutdown...
090713 13:33:26 InnoDB: Shutdown completed; log sequence number 0
738789408
So any ideas on what is going on?
From the error messages it seems that the incremental restore is
stopping because it doesn't see the "structure" of the employee
database in the full backup. Well, it wouldn't see it because it isn't
there. The employee database was loaded after the full backup was
taking..it essentially was what changed between the two backups. So of
course it isn't going on find it.
XtraBackup should create dirs/files when they are not found.