Not the answer you need?
Register and ask your own question!

Corrupt tables after restoring entire MySQL data directory from xtrabackup

Blue_CookehBlue_Cookeh EntrantLegacy User Role Beginner
Hi All,

Our server was forcefully shutdown and rebooted in the early hours of Saturday morning and as such corrupted some of our MySQL (MariaDB) data, namely the ib* files.

Currently we have innodb_force_recovery=6 and innodb_purge_threads=0.

Our logs are full of:
141020 21:05:05 InnoDB: cannot calculate statistics for table habboxfo_forumhx/dbtech_vbactivity_snapshot
InnoDB: because the .ibd file is missing. For help, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
141020 21:05:05 [ERROR] MySQL is trying to open a table handle but the .ibd file for
table habboxfo_forumhx/dbtech_vbactivity_snapshot does not exist.
Have you deleted the .ibd file from the database directory under
the MySQL datadir, or have you used DISCARD TABLESPACE?
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

141020 21:10:04 [ERROR] Invalid (old?) table or database name 'lost+found'
141020 21:10:04 [ERROR] Invalid (old?) table or database name 'lost+found'
141020 21:10:04 InnoDB: cannot calculate statistics for table freeski_drupsite/cache
InnoDB: because the .ibd file is missing. For help, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
141020 21:10:04 [ERROR] MySQL is trying to open a table handle but the .ibd file for
table freeski_drupsite/cache does not exist.
Have you deleted the .ibd file from the database directory under
the MySQL datadir, or have you used DISCARD TABLESPACE?
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

I have backups using Xtrabackup nightly, so that's not an issue. The issue is restoring these. I put all the data back but MySQL errors out and doesn't seem to be able to start without an innodb_force_recovery option, probably because it's missing ib_logfile0 and ib_logfile1 files?

Any ideas how I can go about getting this database back up and running? :(

Comments

  • mirfanmirfan Database Administrator Inactive User Role Beginner
    can you please share what errors you got during backup restore ? What are your steps to restore database ?
    Do you able to dump database tables backup via mysqldump after restore ?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.