This is an old revision of the document!
Mediawiki_backup_and_restore
A couple of things: wikidb.servername.$DAY is just a gzipped mysql dump of the database. wikifiles.$DAY.tbz is simply a tar of the entire directory structure. I have a cron job run daily to backup both.
Create Database Mysql –u root –p Create database wikidb; Exit Restore Database files Cd /<backup location> Gunzip wikidb.servername.$DAY.gz Mysql –u root –p wikidb < wikidb.servername.$DAY
Ensure database restored mysql -u root -p wikidb show tables; <list of tables (about 35 should appear).
Create Wiki User account in MYSQL Mysql –u root -p create user 'wikiuser'@'localhost' IDENTIFIED BY 'password to be used: IMPORTANT make sure this is also the same as in the LocalSettings.php file!'; Grant privileges to wikiuser on wikidb database Mysql –u root –p GRANT ALL ON wikidb.* TO wikiuser at localhost IDENTIFIED BY 'password to be used'; Flush privileges;
Restore wiki config files and images Cd / Tar –xvjf /<backup location>/wikifiles.$DAY.tbz Complete restore process complete – to make sure, perform test plan again
Potential things that may be required are: /<wiki install>/maintenance/php5 rebuildall.php Double double check the correct database, username, password are used in the /<wiki install>/LocalSettings.php file Make sure apache is set up correctly, and the wiki location set appropriately in the LocalSettings.php file
