Possible bug :Data Loss with Full DB backup using XTRABACKUP ?
Hi,
I am facing an issue while doing a Full DB Backup using XTRABACKUP, the backed up data goes corrupt during backup.
Take a full backup of DB.
While backup is going on fire table rename command from one database to another, for e.g.
The full backup completes without any error
When the full backup is prepared, following errors are encountered
InnoDB: Last MySQL binlog file position 0 227287138, file name ./mysql-bin.000085
130502 13:44:57 InnoDB: Error: table 'test/sale_order'
InnoDB: in InnoDB data dictionary has tablespace id 6924,
InnoDB: but tablespace with that id or name does not exist. It will be removed from data dictionary.
130502 13:44:57 InnoDB: Error: table 'test/suborder'
InnoDB: in InnoDB data dictionary has tablespace id 6929,
InnoDB: but tablespace with that id or name does not exist. It will be removed from data dictionary.
130502 13:44:57 InnoDB: Waiting for the background threads to start
130502 13:44:58 Percona XtraDB (http://
But I see that prepare was indeed successful
xtrabackup: starting shutdown with innodb_
130502 13:45:32 InnoDB: Starting shutdown...
130502 13:45:36 InnoDB: Shutdown completed; log sequence number 274420091916
130502 13:45:36 innobackupex: completed OK!
MySQL comes up fine with this backup, but when I see the data directory of the database test, I do not see the *.ibd files for the tables which were renamed
total 1076
-rwxrwxr-x 1 ankit ankit 13975 May 2 11:23 suborder.frm
-rwxrwxr-x 1 ankit ankit 13832 May 2 11:23 sale_order.frm
-rwxrwxr-x 1 ankit ankit 13950 May 2 11:29 user.frm
-rwxrwxr-x 1 ankit ankit 61 May 2 11:29 db.opt
-rwxrwxr-x 1 ankit ankit 1048576 May 2 11:30 user.ibd
On MySQL, the tables are shown to exist under test database but get following error when trying to query them
mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
| Tables_in_test |
| sale_order |
| suborder |
| user |
3 rows in set (0.01 sec)
mysql> select * from sale_order;
ERROR 1146 (42S02): Table 'test.sale_order' doesn't exist
mysql> drop table sale_order;
ERROR 1051 (42S02): Unknown table 'sale_order'
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Ankit for more information if necessary.