user8792354
user8792354

Reputation: 43

Restore MediaWiki site from physical files (MySQL)

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?

Upvotes: 1

Views: 219

Answers (1)

user8792354
user8792354

Reputation: 43

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.

Upvotes: 1

Related Questions