Skip to main content

WMH backup - restore /system files spec _var_lib_mysql.tar

Comments

9 comments

  • cPRex Jurassic Moderator
    Hey there! When a cPanel account is restored I would also expect that to restore the databases. If that didn't happen, it sounds like there may be other issues. Would you happen to have access to that restore log, if that work was performed through WHM? The .tar file you discovered is more of a disaster-recovery style backup, as it's a flat file copy of the /var/lib/mysql directory. It's not nearly as easy to restore from that, and not something we usually recommend.
    0
  • Kirk_C
    Normally the db would be recreated on restore but I had the back up set to {Entire MySQL Directory} instead of {Per Account and Entire MySQL Directory}. So it didn't add db info to account back up tar instead backup puts the {Entire MySQL Directory} in with /system_files creating the _var_lib_mysql_.tar file which is the entire /var/lib/mysql contents. The files are complete and not corrupt. Just not knowledgeable on how to manually restore, WHM help doesn't cover this.
    0
  • cPRex Jurassic Moderator
    The best way to try and get that working would be to unzip the backup file with a command like this: tar -zxvf /backup/2020-12-02/system/dirs/_var_lib_mysql_.tar.gz
    and then completely replace the existing /var/lib/mysql directory with those contents, instead of trying to merge them. Can you try that and see if that provides better results?
    0
  • Kirk_C
    Thanks, sounds like a plan, will try this this evening.
    0
  • Kirk_C
    Well that didn't work at all. Still confused why WHM would do a full db backup to /system/_var_lib_mysql_.tar then not have instructions or a tool to restore. It creates /var/lib/mysql dir with everything from old server but just replacing that dir on new server don't work. MySQL doesn't recognize files and phpmyadmin is totally confused when starts. This is beyond frustrating, it shouldn't be this difficult.
    0
  • cPRex Jurassic Moderator
    The "Entire directory" option is more of a disaster-recovery style backup and there just isn't as automated a way to restore this. We have a link to the MySQL documentation here on how you may be able to get that working:
    0
  • Kirk_C
    Found someone who was able to perform the task and restore the account databases, all well now. THANKS.
    0
  • cPRex Jurassic Moderator
    Great - I'm glad to hear you were able to get that taken care of!
    0
  • asdcxz@1239
    hey, how you have managed to make this work, we have situation where virtulizor is failing to restore a vps backup, now we need to manualy restore database for cpanel, any pointers will be helpful
    0

Please sign in to leave a comment.