Prerequisites

To install the Wiki, we need:

  • an apache 2 Http daemon with PHP5 installed
  • Mysql 5 database server
  • Phpmyadmin to make it easier (optional)

For local installs, this can be done easily using an all-in-one tool:

  • WAMP on windows
  • MAMP on MACOSX
  • for linux, don'have to explain :)

Backup Procedure

1- Backup the database :

  • by copying the mysql data/wikidb folder.
  • or by using the command line: mysqldump -p wikidb > sql_backup_file
  • or with phpmyadmin / export function.

2- Backup the web application

Save the www folder containing the mediawiki install and parameters (Specially /LocalSettings.php).

Restore Procedure

The restore process assumes the server is already up and running. And mysql has been set a root password.

1- Restore the database :

  • copy back the mysql wikidb folder to the mysql data folder.
  • or backup using the command line:  mysql -p wikidb < sql_backup_file
  • or with phpmyadmin / import function.

2- Create a wikidb user with all privileges to the wikidb database & Grant option.

This can be done with phpmyadmin (much easier)

Or you can do it with the mysql admin console:

# mysql --user=root mysql
#mysql> CREATE USER 'wikidb'@'localhost' IDENTIFIED BY 'PASSWORD';
#mysql> GRANT ALL PRIVILEGES ON wikidb.* TO 'wikidb'@'localhost'
     ->     WITH GRANT OPTION;

3- Restore the web application

Copy the /www contents to the apache server’s root folder

Adapt the /www/LocalSettings.php Database parametersto the new server.

Done !