Difference between revisions of "Wikibackup"
From Teknologisk videncenter
m |
m (→Restoring the database) |
||
Line 26: | Line 26: | ||
mysql -u USER -pPASSWORD DATABASENAME < mysql.dump | mysql -u USER -pPASSWORD DATABASENAME < mysql.dump | ||
</pre> | </pre> | ||
+ | [[category:Mysql]] |
Latest 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