0

I had a server running Ubuntu 12.04 crash, and had to fully reinstall. I have a full physical backup of all files stored on the server, including the ibdata1, .frm, and .idb files associated with my databases, which were largely using InnoDB in MariaDB 5.5. However, since this is just a little side project, and an opportunity for me to get my feet wet dealing with server and database administration, I am at a loss for where to proceed from here. I can find numerous references for how to proceed if you are missing any of these files, mostly covering that it is extremely difficult to do so, but possible, however, I cannot find any instructions for how to successfully restore the database from a backup containing all of these files. Clearly I'm missing something.

Moving forward I'll be sure to add making a logical backup to the list of priorities, but it's a bit late for than now. And while I'd very much prefer to not write the data I have off, if that's what it comes to, I'll chalk it up as a learning experience.

1
  1. Put all the files back where they were.
  2. Start mysql/mariadb.

Caveat: If MySQL/MariaDB was running when you took the physical dump, there may be issues.

  • This was exactly where I started, and it did not initially succeed. After maybe 10 cycles of clearing the data directory, uninstalling everything mysql related, reinstalling, copying the backup into place, and trying again, I finally found my stumbling block. I had accidentally started the mysqld process independently of the system service, and even when I would stop that service, it remained running, and would never register the files had been copied over. So for anyone else who manages to run into this, make sure every mysql related process has been stopped, and follow the directions above. – Andrew N Nov 17 '16 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.