Restoring mediawiki from database backup

From Notes_Wiki
Revision as of 07:56, 22 January 2019 by Saurabh (talk | contribs)

<yambe:breadcrumb self="Restoring mediawiki from database backup">Mediawiki maintenance scripts|Mediawiki maintenance scripts</yambe:breadcrumb>

Restoring mediawiki from database backup

Most of the times during restore the latest version of mediawiki available would be never then version of mediawiki from which backup was taken. In such situations there are two ways to restore mediawiki from database backups:

  1. Restore database backup into active database and then configure mediawiki to get LocalSettings.php.
  2. Configure mediawiki to get LocalSettings.php and then restore database backup over mediawiki database

In first case when we configure mediawiki over existing database which has tables and values, mediawiki would recognize that older database exists and upgrade it as per latest mediawiki schema. In second case when we restore old database and overwrite latest wiki database, then wiki may fail to load with error message. In such cases we need to run:

php maintenance/update.php

command from wiki base folder to upgrade database. This will then allow latest wiki to load properly.


<yambe:breadcrumb self="Restoring mediawiki from database backup">Mediawiki maintenance scripts|Mediawiki maintenance scripts</yambe:breadcrumb>