For MySql experts, database corrupted can I recover it?

Hello,

I have a disaster and need urgent help, server details are as below:

Blockquote
Ubuntu 20.04.4 LTS

Blockquote
CyberPanel
Current Version: 2.3
Build: 2
Current Commit: d617e48d37b9f7bb65ffa6a23547bd8a9a99853e
Latest Version: 2.3
Latest Build: 4
Latest Commit: 7d03fb6de16dfe9036aafc241e2c46e5bda64ef4

We had something like an update for our huge WordPress website, and we had to drop the whole database, so we took a backup first “actually 2 backups” and dropped the database successfully using phpmyadmin, after the update we tried to restore the database from the dumb and we found out that the restored database is broken after only 30mb while the original database size should be around 700 - 800 MB.

We used Photorec to try and recover database tables and we recovered many .ibd files with scrambled names, and we found many tutorials online to recover the tables from the ibd files, but these methods don’t actually work as we are missing the tables headers and the “Create statement” which prevents us from recreating any table, we don’t even have the files names to try and get the “create statement” from a very old intact backup for the website.

Is there any way to fix the database? It’s 2 years work and can’t be redone again.

Appreciate any help.

You have snapshot or backups from VPS provider? If not sounds like you are in world of troubles…

The last intact backup was at August 2022 which is way back.

Don’t have any snapshots for the server. :frowning:

Sad to hear this. This is a result of Cyberpanel’s failure to fix the DB export from PhpMyadmin which they have been notified a very long time now.
Any database over 30MB will truncate at 30MB when exporting. I’m sorry that you had not encountered this issue before as I have had, but not as bad as in your case as we also do cloud backups. The only proper way to export is to enable phpmyadmin to save backups on the server or to use mysqldump command from SSH.

Sorry I have no suggestions for recovery.

Appreciate your reply.

It seems I missed this notification, or I wasn’t using Cyberpanel at this point so I didn’t know about it, I think this kind of issues must be announced inside the panel itself so the new users don’t get surprised by this issue as it happened in our case.

Hope someone could shed some light to solve this issue.