Skip to main content

Reconstructing user database from raw files

Comments

4 comments

  • dalem
    when you say "have are the raw files" does that mean that you have the current MySQL folder I would try backing up anything that's on the new server that you need to keep then stop mysql ( be sure to disable it In WHM do it does not restart mv /var/lib/mysql/ /var/lib/mysql-old ( just in case you want to revert back) then rsync the entire /mnt/var/lib/mysql/ back to /var/lib/mysql/ cross fingers & restart mysql Possibly adding the innodb_force_recovery=X at each level if it does not start There are some recovery tools in the innodb thread on this form you can try but I would try above first
    0
  • m4f1aboy
    I was not able to use rsync as it gave me input/output errors when reading the files. I tried setting up another instance in AWS and attached the drive and manually copied over a user database into the /var/lib/mysql directory and started mariadb with no issues. When using show databases and tables the information comes up, however, when using mysqlcheck I get the same type of errors: can't find file. This tells me that data within the tables are corrupt and can't be repaired. Conclusion The good: I have learned a ton during this recovery process. The bad: I will more than likely not be able to recover the database data. I would suggest to always make backups before trying to extend storage to any partition table. The only other option now is to try and repair / rebuild the original drive to become bootable again. ------------------------------------------------------------------------------------------------------------------------------------------------ Thank you for the help and suggestions! Cheers!
    0
  • cPanelLauren
    I would suggest to always make backups before trying to extend storage to any partition table.

    There are two major things in this sentence I want to point out: 1. you should absolutely ALWAYS be taking backups. Especially before making changes to the server but you should be making them regularly. 2. Extending storage to a partition table is a sensitive modification and isn't necessarily recommended to do, to begin with, unless you're well versed in making these kinds of modifications I do hope you're able to retrieve the data off the drive, you might want to contact a system administrator to discuss potential options. If you don't have one available you might find one here: System Administration Services
    0
  • dalem
    some good resources here
    0

Please sign in to leave a comment.