Difference between revisions of "HOWTO backup and install the GlueX wiki"

From GlueXWiki
Jump to: navigation, search
(Created page with "Here are instructions for backing up the GlueX wiki and reinstalling it at another location. This is motivated by the ongoing US Federal Government shutdown of 2013 that may caus...")
 
(change mediawiki version in examples to 1.17.0)
Line 20: Line 20:
 
=== Unpacking the files ===
 
=== Unpacking the files ===
 
1. Unpack MediaWiki
 
1. Unpack MediaWiki
  > tar xzvf mediawiki-1.20.2.tar.gz
+
  > tar xzvf mediawiki-1.17.0.tar.gz
 
2. Rename "mediawiki-X" directory to "wiki"
 
2. Rename "mediawiki-X" directory to "wiki"
  > mv mediawiki-1.20.2 wiki
+
  > mv mediawiki-1.17.0 wiki
 
3. Unpack tarball from GlueX wiki backup
 
3. Unpack tarball from GlueX wiki backup
 
  > tar xzvf wiki_backup_13-10-09.tgz
 
  > tar xzvf wiki_backup_13-10-09.tgz
 
4. Move files from backup directory into wiki directory
 
4. Move files from backup directory into wiki directory
 
  > cp -rp wiki_backup_13-10-09/* wiki
 
  > cp -rp wiki_backup_13-10-09/* wiki
 
  
 
=== Filling the Database ===
 
=== Filling the Database ===

Revision as of 08:38, 12 October 2013

Here are instructions for backing up the GlueX wiki and reinstalling it at another location. This is motivated by the ongoing US Federal Government shutdown of 2013 that may cause JLab to close temporarily. To avoid complete disruption to the collaboration, we are preparing to move it to the URegina server temporarily.


Technical details

The GlueX wiki uses MediaWiki with a MySQL database for the backend. The wiki is hosted at JLab with these settings:

  • host = halldweb1.jlab.org (webserver and MySQL server)
  • dbname = wikidb
  • mysql user = wiki


Backing up the wiki

Restoring the wiki

Before starting, you'll need to get your PHP-enabled web-sever up and running as well as you MySQL database. Once those are working, go to the directory where the wiki pages will be served from and follow these steps:

Unpacking the files

1. Unpack MediaWiki

> tar xzvf mediawiki-1.17.0.tar.gz

2. Rename "mediawiki-X" directory to "wiki"

> mv mediawiki-1.17.0 wiki

3. Unpack tarball from GlueX wiki backup

> tar xzvf wiki_backup_13-10-09.tgz

4. Move files from backup directory into wiki directory

> cp -rp wiki_backup_13-10-09/* wiki

Filling the Database

Prior to filling the database, you need to make sure you have an account there that the webserver can write to.

1. Edit the file wiki/LocalSettings.php to set the connection parameters for the database (look for the string wgDBserver). For example, to install this on my laptop I changed this :

$wgDBserver         = "halldweb1.jlab.org";
$wgDBname           = "wikidb";
$wgDBuser           = "wiki";
$wgDBpassword       = "wiki";
$wgDBprefix         = "gluex_";
$wgDBtype           = "mysql";

to this

$wgDBserver         = "localhost";
$wgDBname           = "wikidb";
$wgDBuser           = "www";
$wgDBpassword       = "";
$wgDBprefix         = "gluex_";
$wgDBtype           = "mysql";

2. Create the wikidb database on the server

> mysql -u www
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.1.43 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database wikidb;
mysql> quit

3. Fill the database using the wikidb.sql file

>mysql -u www wikidb < wikidb.sql