Difference between revisions of "Wikibackup"
From Teknologisk videncenter
m (→mysqldump) |
m |
||
Line 1: | Line 1: | ||
− | == Backup of this wiki == | + | *Backup of /usr/local/www/mediawiki and /usr/local/etc/apache directories nessesary |
+ | *Backup of Mysql database | ||
+ | *backup of SphinxSearch engine setup (cron etc) | ||
+ | == Backup of this wiki database == | ||
=== Locking the database === | === Locking the database === | ||
Line 12: | Line 15: | ||
</pre> | </pre> | ||
[[category:Database]][[category:mediawiki]] | [[category:Database]][[category:mediawiki]] | ||
+ | == Restore of this wiki == | ||
+ | === Locking the database === | ||
+ | |||
+ | During restore, the database will be locked using the [http://www.mediawiki.org/wiki/Manual:$wgReadOnly $wgReadOnly] variable in LocalSettings.php | ||
+ | <pre>$wgReadOnly = '<b>Backup operation in progress.</b> Please wait a few minutes.'; | ||
+ | </pre> | ||
+ | === Restoring the database === | ||
+ | Consider dropping the database from mysql before restoring it | ||
+ | <pre> | ||
+ | mysql -u USER -pPASSWORD DATABASENAME < mysql.dump | ||
+ | </pre> |
Revision as of 13:41, 4 June 2009
- Backup of /usr/local/www/mediawiki and /usr/local/etc/apache directories nessesary
- Backup of Mysql database
- backup of SphinxSearch engine setup (cron etc)
Contents
Backup of this wiki database
Locking the database
During backup, the database will be locked using the $wgReadOnly variable in LocalSettings.php
$wgReadOnly = '<b>Backup operation in progress.</b> Please wait a few minutes.';
mysqldump
example
mysqldump -u USERNAME -pPASSWORD --default-character-set=latin1 wikidb -c > /home/backup/wikidb120209.dump
Restore of this wiki
Locking the database
During restore, the database will be locked using the $wgReadOnly variable in LocalSettings.php
$wgReadOnly = '<b>Backup operation in progress.</b> Please wait a few minutes.';
Restoring the database
Consider dropping the database from mysql before restoring it
mysql -u USER -pPASSWORD DATABASENAME < mysql.dump