Wiki backup
From PTAGISWiki
When a new release of mediawiki is made available, one of the steps is to backup the current wiki database. This page describes how to backup and restore our wiki.
Tools
mysqldump
Procedure
The wiki and mysqld runs on bay.
bay.psmfc.org:C1:root: > /usr/local/mysql/bin/mysql -D ptagiswiki Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 85754 to server version: 4.0.21 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
It is helpful to include the version of mediawiki in the backup, especially if this backup is prior to a version upgrade.
bay.psmfc.org:C1:root: > /usr/local/mysql/bin/mysqldump ptagiswiki > 20060816-1.5.6.sql bay.psmfc.org:C1:root: > pwd /usr/local/pitweb/ptagis/wiki/backup bash-3.00# ls -lh total 262359 -rw-r--r-- 1 root root 128M Dec 30 12:50 20081230-1.5.6.sql
Restore
Given a valid backup, it can be restored like this:
bash-3.00# mysql ptagiswiki Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 183 to server version: 5.0.24 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> source ptagiswikimove-ptagis-wiki.sql
