Open leandrocombr opened 1 year ago
Hi!
I had 3 databases accidentally deleted on my server. And the Backup is corrupted!
Faced with the fact, I managed to recover the *.ibd files from the server
However, when importing, the following message appears:
ALTER TABLE table IMPORT TABLESPACE;
table
$ tail -f mysql.log 2022-10-23T17:56:27.745864Z 561230 [Note] [MY-012164] [InnoDB] Sync to disk 2022-10-23T17:56:27.891192Z 561230 [Note] [MY-012166] [InnoDB] Sync to disk - done! 2022-10-23T17:56:27.891365Z 561230 [Note] [MY-012774] [InnoDB] Phase I - Update all pages 2022-10-23T17:56:28.193391Z 561230 [Warning] [MY-012769] [InnoDB] Page 24064 at offset 394264576 looks corrupted in file ./database/table.ibd 2022-10-23T17:56:28.193497Z 561230 [Note] [MY-012770] [InnoDB] Failed to import tablespace of table 'database/table': Data structure corruption
How do I recover accidentally deleted database/tables?
There is an option --innodb_force_recovery with different levels. It might help.
See https://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
Hi!
I had 3 databases accidentally deleted on my server. And the Backup is corrupted!
Faced with the fact, I managed to recover the *.ibd files from the server
However, when importing, the following message appears:
ALTER TABLE
table
IMPORT TABLESPACE;$ tail -f mysql.log 2022-10-23T17:56:27.745864Z 561230 [Note] [MY-012164] [InnoDB] Sync to disk 2022-10-23T17:56:27.891192Z 561230 [Note] [MY-012166] [InnoDB] Sync to disk - done! 2022-10-23T17:56:27.891365Z 561230 [Note] [MY-012774] [InnoDB] Phase I - Update all pages 2022-10-23T17:56:28.193391Z 561230 [Warning] [MY-012769] [InnoDB] Page 24064 at offset 394264576 looks corrupted in file ./database/table.ibd 2022-10-23T17:56:28.193497Z 561230 [Note] [MY-012770] [InnoDB] Failed to import tablespace of table 'database/table': Data structure corruption
How do I recover accidentally deleted database/tables?