MYSQL DB Restore

Discussion in 'Server Operation' started by bschultz, Jul 12, 2020.

  1. bschultz

    bschultz Member

    I recently had a hard drive failure on one server. I decided to merge that server with an existing server (also ISPConfig 3).
    I don't use ISPConfig for the web sites, as I just hard code the Apache files. I recreated the entries for the mailboxes (which DO use ISPConfig) and copied the RSync backups of the crashed servers /var/vmail directory and the /var/www directory. All was good with mail and web.

    My problem is with the MYSQL backup. The crashed server was running Mariadb-server and the working server was using mysql-server. I stopped the mysql server, copied in the files from the Rsync backup, and restarted the mysql server.

    It didn't start....complaining of no socket file.

    I purged the /var/lib/mysql directory, and copied in all the files from the working server backup (which contained the dbispconfig tables) and then copied in the DB tables again from the crashed server...without the dbispconfig tables, mysql tables and phpmyadmin tables.

    I restarted the mysql server again, and it started.

    My problem is a lot of the files read as IN USE in phpmyadmin. In looking at the backups, there are no MYI files, just FRM files in the backup for the working server.

    I've since upgraded the working server to Mariadb as well.

    Is there anyway to recover this data?
     
  2. bschultz

    bschultz Member

    I figured that I was not going to get the data back. My original situation was this:

    two Debian 8 servers....both running ISPConfig3

    I wanted to move the data off server #1 and place it onto server #2. Then, I wanted to run everything off server #2 while I did a clean install of Debian 10 on server #1. Then, I wanted to move everything back to server #1 and retire server #2.

    After moving everything to server #2, I started the early steps of a fresh install on server #1. Before I got to the part of partitioning the hard drive, server #2's hard drive failed and is dead.

    I had the backups from server #2, so I moved everything back to server #1 and am still running Debian 8.

    Now, it's past the EOL for Debian 8 and Debian 9. Since I don't have another server to do a fresh install of Debian 10, can I upgrade from Debian 8 to Debian 9 using the ARCHIVE APT sources...and then go to Debian 10 from there while still having the server running?

    Thank you!
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You can upgrade Debian 8 to 9 and then 9 to 10. Follow instructions from Debian Release Notes for each release. After Debian is upgraded, go through ISPConfig Perfect Server Guide for the upgraded to Debian version to make sure all needed packages are installed and configurations are OK. Then force ISPConfig to reconfigure services (search ISPConfig forum on how to do that).
    Please pay attention to which forum you post. ISPConfig forums are for ISPConfig things.
     
  4. nhybgtvfr

    nhybgtvfr Active Member

Share This Page