Page 1 of 1

Restore mysql data from backupü of data-folder

PostPosted: 02. August 2023 12:35
by Change
Hello,

because of a potential corrupted ibdata1 file i made a backup of the data folder and copied the content of the backup-folder into the data folder.
Before this the MySQL server wont start, now it starts, but the tables are all empty.

What i have to do to restore the data from the old data files?

Many Thanks in advance :)

Re: Restore mysql data from backupü of data-folder

PostPosted: 02. August 2023 20:13
by Change
I uploaded the mysql_error.log of one start attempt with the old data:
Image

Log:
https://pastebin.com/GNxSnnEc

I dont know why this happens.
Had no Problems before

Re: Restore mysql data from backupü of data-folder

PostPosted: 02. August 2023 21:16
by Nobbie
Change wrote: and copied the content of the backup-folder into the data folder.


That does not work. The backup folder is for internal MariaSQL Data only, not for user backups. If you simply copy the contents of the backup folder, you probably destroy all data. Instead you must create your own backups.

Re: Restore mysql data from backupü of data-folder

PostPosted: 02. August 2023 21:56
by Change
Thanks for your answer. I know that the backup folder has just a clean server backup inside.
I just copied them to data folder to go sure its the corrupted ibdata file.

Now i copied the old data-files (which i backuped for myself before) back in but the ibdata seems to be corrupted. What i have to do to bring the mysql server up again?

Re: Restore mysql data from backupü of data-folder

PostPosted: 02. August 2023 22:47
by Nobbie
You need a non corrupted ibdata. If you dont have a working backup, i have no idea. Or do new installation, but this does not restore your own data.

Re: Restore mysql data from backupü of data-folder

PostPosted: 03. August 2023 00:06
by Change
I see, i tried to start th mysql server with
innodb_force_recovery=5
(Level 1-4 was not successfull). The server starts (the xampp control panel shows running) but when trying to connect via phpmyadmin it loads infinite and when trying HeidiSQL the program freezes.
Is there another possibility to create a backup of a corrupted ibdata file or to export the data from it?

Re: Restore mysql data from backupü of data-folder

PostPosted: 03. August 2023 19:43
by Nobbie
No, corrupted means corrupted.

Re: Restore mysql data from backupü of data-folder

PostPosted: 03. August 2023 20:29
by Change
Are you really sure?
I tried the Demo of the Software Stellar Repair for MySQL it wa able to show all databases, tables and data.
Unfortunatelly you need a paid Licence to Export these Data. But 200 € is way to much :shock:
But it shows, that the data is still readable, isn't it?

Re: Restore mysql data from backupü of data-folder

PostPosted: 03. August 2023 21:01
by Nobbie
Of course it depends on the amount and kind of corruption. Without any further knowledge its impossible to say if it can be recovered or not. Anyway, having a full working backup is always the best solution. I cannot help you on that.

Re: Restore mysql data from backupü of data-folder

PostPosted: 03. August 2023 23:20
by Change
I see, can you maybe recommend alternative software to restore data like the Stellar Repair does?

Re: Restore mysql data from backupü of data-folder

PostPosted: 04. August 2023 15:10
by Nobbie
No.