Difference between revisions of "Wikispooks:Site Backup"

From Wikispooks
Jump to navigation Jump to search
(resize iframe)
m (big changes - using pre-configured WS site software turns not to be a practical proposition)
Line 21: Line 21:
 
*<code>ws.sql</code> - an uncompressed version of the site database.
 
*<code>ws.sql</code> - an uncompressed version of the site database.
  
==Running A Copy Of The Site==
+
==Overview==
 
To host Wikispooks on your machine, you will need:
 
To host Wikispooks on your machine, you will need:
 
* Some knowledge of running a webserver
 
* Some knowledge of running a webserver
Line 31: Line 31:
 
''N.B. Either [http://www.wampserver.com/en/ WampServer] or [http://www.apachefriends.org/en/xampp.html‎ Xampp] provides the web-server software you need to run the Wikispooks site locally.''
 
''N.B. Either [http://www.wampserver.com/en/ WampServer] or [http://www.apachefriends.org/en/xampp.html‎ Xampp] provides the web-server software you need to run the Wikispooks site locally.''
  
==Basic Instructions==
+
==Setting up and running a Copy Of The Site==
*Unzip the wikispooks backup file to a web server root directory.
+
The backups enable you to import all the files, images and text-content of the site into 'Mediawiki'. Your first task is therefore to install Mediawiki and some mandatory Mediawiki extensions. A list of ALL installed site extensions is '''[[Special:Version|shown here]]'''. Many of them are mandatory for the site to work properly.
*Create a new blank MySQL database
+
 
*Locate the <code>backups/ws.sql</code> for restoring the Wikispooks MySQL database
+
===Mandatory extensions===
*Create a dedicated database user with full privilages; note this username and password.
+
A list of mandatory extensions in approximate order of importance for a functional and presentable site:
*Import the ws.sql database dump into the new database.  
+
*Semantic MediaWiki  - '''NB''': The site will not display ANY pages without this extension.
** '''N.B.''' The file is too large for a default configuration of phpMyAdmin to handle. Try a MySQL command for this, e.g.
+
*Semantic Forms
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
+
*Semantic Result Formats
 +
*ParserFunctions
 +
*Cite
 +
*Poem
 +
*Widgets
 +
*Gadgets
 +
*CategoryTree
 +
*No title
 +
*MagicNoCache
 +
*MiniMp3
 +
*SubString and StrLen
 +
'''Note''' A few mandatory extensions are not listed above because they are included with a standard installation of one or more of those that are mentioned.
 +
 
 +
===The 'LocalSettings.php' file===
 +
Successful installation of the Mediawiki software requires that you download an install-generated file called <code>"LocalSettimgs.php"</code>, and put it into the Mediawiki root directory - usually <code>/serverRoot/w/</code>. The file is editable with any plain-text editor. The end of the file will contain the following text:
 +
 
 +
<pre>
 +
# End of automatically generated settings.
 +
# Add more configuration options below.
 +
</pre>
 +
 
 +
The wikispooks site requires a number of custom configuration parameters, most notably to define new namespaces, extension statements, and permissions. The easiest way for you to include everything necessary is to append the text file <code>"LSadditions.txt"</code> at the end of the auto-generated part of the file. However, note that  <code>"LSadditions.txt"</code> includes ALL the wikispooks installed extension statements so, if you don't install ALL of them too, you may get errors reported. These can be dealt with by commenting out the corresponding extension statements.
  
===Modifying <code>LocalSettings.php</code>===
+
Both the Mediawiki and extensions software, together with comprehensive installation instructions are available '''[http://www.mediawiki.org/wiki/MediaWiki from here]'''
  
 +
====Error reporting====
 
If things don't go smoothly, adding the following lines to LocalSettings.php will give you some diagnostic output:
 
If things don't go smoothly, adding the following lines to LocalSettings.php will give you some diagnostic output:
 
::<code>$wgShowExceptionDetails = true;</code>
 
::<code>$wgShowExceptionDetails = true;</code>
Line 47: Line 69:
 
It's recommended to take these lines out once things are working OK.
 
It's recommended to take these lines out once things are working OK.
  
You will have to edit the <code>LocalSettings.php</code> file since the <code>LocalSettings.passwords.php</code> file which it includes is omitted from the backup for security reasons. The simplest way to get your system working is to read the notes at the top of <code>LocalSettings.php</code>, and amend it with the access credentials above to fit your database.
+
==Getting the wikispooks site files, images and content into Mediawiki==
 
+
Once you have a working installation of Mediawiki, proceed as follows:
===Using the Default MediaWiki Setup===
+
*Unzip <code>"sqldump-latest.zip"</code> in a convenient directory. This will will generate a file named <code>"ws.sql"</code>
If you experience trouble with the above method, you can try the (slightly longer) standard Mediawiki setup procedure. To use this, rename <code>LocalSettings.php</code> <code>LocalSettings.php.backup</code> and then browse to the site and follow instructions. Mediawiki will create a blank database and a matching '.../w/LocalSettings.php' file to allow access. You will then need to modify:
+
*Unzip <code>"files-latest.zip"</code> '''in the web server root directory'''. This will generate many directories and files in and under the web server root.
# The database - import from the SQL dump at <code>backups/ws.sql</code> whicih will add the pages to the Wiki
+
*Import the ws.sql database dump into the new database.
# The basic <code>LocalSettings.php</code> file to include the required extensions and other site configuration. There are many Mediawiki extensions in use on the site (including 'Widgets', 'Semantic MediaWiki', 'Semantic Forms', 'News', 'DynamicPageList' & 'Category Tree') which are fundamental to the proper display and operation of the site. These are all included and correctly configured in the backup, but must be included from the <code>LocalSettings.php</code> file to be made operational.
+
** '''N.B.''' The file is too large for a default configuration of phpMyAdmin to handle. Try a MySQL command for this, e.g.
 +
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
  
 
===Finishing Touches===
 
===Finishing Touches===
The procedure as explained above is sufficient for the database and all the files. There will be a number of Apache config parameters that need setting in order for 'pretty URLs' to work properly, such as a <code>.htaccess</code> file. Full details can be found on the [http://www.mediawiki.org/wiki/MediaWiki Mediawiki web site].
+
The procedure as explained above is sufficient for the database and all the files. There will be a number of Apache config parameters that need setting in order for 'pretty URLs' to work properly, such as a <code>.htaccess</code> file. Full details can be found on the [http://www.mediawiki.org/wiki/MediaWiki Mediawiki web site].
  
 
==Running A Live Site Mirror==
 
==Running A Live Site Mirror==

Revision as of 12:45, 14 January 2014

SiteBackup.png

Tools.png {{{Add text here}}}

Even if you are a casual reader and not a contributor to this project, you are encouraged to download and keep a backup copy of the site database (~250 MB) and it's associated files and images (~2.3 GB) in case of technical or other problems. Backups of the full Mediawiki software suite (~50 Mb), as configured for the site, are also available.

Backups are published weekly to ensure that, should the site become unavailable for any reason, the information will not be lost - many people around the world will have a reasonably up to date version. The site is open licenced so you are free to copy the information and publish it elsewhere, either as an exact mirror or as part of another website.

Content of the 'Backups' directory

Publicly downloadable backup files are shown in the Index of/backups box above right. Backup dates are included in the filenames. Those in the form name-latest.zip are copies of the latest name-yyy-mm-dd.zip files.

  • files-xxxx.zip - files contain the site images and files.
  • sqldump-xxxx.zip - files contain the site database.
  • mediawiki-xxxx.zip - files contain the Mediawiki software suite as currently configured for the site
  • readme.txt - a text rendering of this page.
  • wikispooks-xxxx - files contain both site images/files and database and are being phased out.
  • ws.sql - an uncompressed version of the site database.

Overview

To host Wikispooks on your machine, you will need:

  • Some knowledge of running a webserver
  • Some knowledge of the Mediawiki software
  • A site-backup set - The necessary backup files are listed above and here.
  • A computer with at least 5 Gb of free disk space that runs a web server, including
    • PHP v 5.3.2 +
    • MySQL v 5.0.2 +

N.B. Either WampServer or Xampp provides the web-server software you need to run the Wikispooks site locally.

Setting up and running a Copy Of The Site

The backups enable you to import all the files, images and text-content of the site into 'Mediawiki'. Your first task is therefore to install Mediawiki and some mandatory Mediawiki extensions. A list of ALL installed site extensions is shown here. Many of them are mandatory for the site to work properly.

Mandatory extensions

A list of mandatory extensions in approximate order of importance for a functional and presentable site:

  • Semantic MediaWiki - NB: The site will not display ANY pages without this extension.
  • Semantic Forms
  • Semantic Result Formats
  • ParserFunctions
  • Cite
  • Poem
  • Widgets
  • Gadgets
  • CategoryTree
  • No title
  • MagicNoCache
  • MiniMp3
  • SubString and StrLen

Note A few mandatory extensions are not listed above because they are included with a standard installation of one or more of those that are mentioned.

The 'LocalSettings.php' file

Successful installation of the Mediawiki software requires that you download an install-generated file called "LocalSettimgs.php", and put it into the Mediawiki root directory - usually /serverRoot/w/. The file is editable with any plain-text editor. The end of the file will contain the following text:

# End of automatically generated settings.
# Add more configuration options below.

The wikispooks site requires a number of custom configuration parameters, most notably to define new namespaces, extension statements, and permissions. The easiest way for you to include everything necessary is to append the text file "LSadditions.txt" at the end of the auto-generated part of the file. However, note that "LSadditions.txt" includes ALL the wikispooks installed extension statements so, if you don't install ALL of them too, you may get errors reported. These can be dealt with by commenting out the corresponding extension statements.

Both the Mediawiki and extensions software, together with comprehensive installation instructions are available from here

Error reporting

If things don't go smoothly, adding the following lines to LocalSettings.php will give you some diagnostic output:

$wgShowExceptionDetails = true;
$wgShowSQLErrors = 1;

It's recommended to take these lines out once things are working OK.

Getting the wikispooks site files, images and content into Mediawiki

Once you have a working installation of Mediawiki, proceed as follows:

  • Unzip "sqldump-latest.zip" in a convenient directory. This will will generate a file named "ws.sql"
  • Unzip "files-latest.zip" in the web server root directory. This will generate many directories and files in and under the web server root.
  • Import the ws.sql database dump into the new database.
    • N.B. The file is too large for a default configuration of phpMyAdmin to handle. Try a MySQL command for this, e.g.
$ mysql -u username -p password -h localhost data-base-name < ws.sql

Finishing Touches

The procedure as explained above is sufficient for the database and all the files. There will be a number of Apache config parameters that need setting in order for 'pretty URLs' to work properly, such as a .htaccess file. Full details can be found on the Mediawiki web site.

Running A Live Site Mirror

If you have interest and resources to set up a realtime site mirror on your server, you are encouraged to do so. We may also be able to provide you with some technical assistance if needed. Requests for help setting up realtime mirrors should be addressed to admin[at]wikispooks.org and encrypted with this key.

Notes

The following items are not included in the backup:

Known Issues

  • Many of the in-text links (especially on 'Category:IFrame' pages) will take you to the master Wikispooks site. This is because urls which ought to be coded as relative, have in fact been entered as absolute urls. It is easy to manually change any such url's in your browser address-bar at run time (simply replace 'https://wikispooks.com/' with 'localhost/your_root_dir_name/'. This issue will be addressed at source as and when.
  • Suggestions, Queries etc? - Either Email the admin (non-WikiSpooks members) or use this discussion page (WikiSpooks members)