1

One of our servers crashed last week and it wouldn't boot. So I got a full copy of the whole file system, and restored a previous backup. Now it is up and running, but there is a problem: the most recent changes made to a MediaWiki site were lost (the backup is a month old). It's not much, just a couple of modifications to some articles here and there.

I am currently trying to restore the last MySQL tables of the site. The proper way of doing that is with the mysqldump command, but this is not an option because I can't boot the server, I only have the files. So I read that you can do it manually if you copy all files in /var/lib/mysql/[dbname]:

Well, I tried stopping the MySQL service and moving the files from the copy to the server, and I even granted the database user privileges again just in case, but it won't work. The site keeps showing the month old articles (yes, I have cleared the cache, and rebooted) and I don't understand why, because the files I am restoring clearly have their "last updated" field set to the date when the last changes to the wiki were made (I know that for sure).

Am I missing something here?

Community
  • 1
  • 1
  • 1
    There might be some data in `/var/lib/mysql/ibdata` and other files in `/var/lib/mysql` outside of database directories. Have tou tried restoring whole `/var/lib/mysql`? Also, your MediaWiki might use [file cache](http://www.mediawiki.org/wiki/Manual:File_cache) which caches rendered pages in the filesystem, and should be disabled in your situation. – che May 11 '15 at 12:21
  • @che Thanks! The cache was not the problem, the other files were. Copying the whole directory instead of just the database did the job. Kudos to you. – user8792354 May 12 '15 at 10:06

1 Answers1

1

Problem solved thanks to user @che. I had to copy the whole /var/lib/mysql directory, not just /var/lib/mysql/[dbname]. Apparently some database information is also contained in those files.