Difference between revisions of "Wikispooks:Site Backup"

From Wikispooks
Jump to navigation Jump to search
m (t)
m (should get this done today)
Line 10: Line 10:
  
 
==Content of the 'Backups' directory==
 
==Content of the 'Backups' directory==
Be sure to check the dates in the '''<font face="Serif">Backups list</font>''' box on the right. You will probably want <code>site-latest.zip</code>, since this will always be the most up to date.
+
* Available files are listed in the '''<font face="Serif">Backup files list</font>''' box on the right. The main site backup files are in the form <code>site-YYYY-MM-DD.zip</code> indicating the date taken and there will usually be at least 4 generations of them. The file {{BULink|site-latest.zip}} links to the most up-to-date of the site backups.
{|
+
* {{BULink|wikileaks.zip}} contains '''Bit-Torrent''' files for the entire wikileaks site between it's original launch in 2006 to February 2010.
<!--
+
* From time-to-time there may be other [[Wikispooks:About|Wikispooks project]]-related files made available for download.
| [[image:file.gif|20px|link={{server}}/backups/LSadditions.txt]] {{BULink|LSadditions.txt}}
+
===Notes===
|&nbsp;&nbsp;&nbsp;&nbsp;''- text to add to the end of'' <code>LocalSettings.php</code>
+
'''The following items are ''not'' included in the main site backup files:'''
|
+
* The 'Anon Uploads Form'
|-
+
* 'Piwik stats'
| [[image:file.gif|20px|link={{server}}/backups/Readme.txt]] {{BULink|Readme.txt}}
+
* Wikileaks 'Torrents' - Separate download {{BULink|here|wikileaks.zip}}
|&nbsp;&nbsp;&nbsp;&nbsp;''- a text rendering of this page''
+
 
|
+
==Setting up and running a Copy Of The Site==
|-
+
A single main site backup file contains everything needed to run a copy or mirror of the Wikispooks site on a suitably configured web server. '''[http://httpd.apache.org/ Apache]''' is the web server used by Wikispooks and assumed in these instructions although [http://nginx.org/en/ NginX], [http://www.microsoft.com/web/platform/server.aspx IIS] and other web servers can be configured to run Mediawiki.
-->
+
 
| [[image:compressed.gif|20px|link={{server}}/backups/site-latest.zip]] {{BULink|site-YYYY-MM-DD.zip|files-latest.zip}}
+
''N.B. Either [http://www.wampserver.com/en/ WampServer] or [http://www.apachefriends.org/en/xampp.html‎ Xampp] provides all the Apache web-server software need to run the Wikispooks site locally on either a Linux or Windows machine.''
|&nbsp;&nbsp;&nbsp;&nbsp;''- a ZIP file of the entire site wiki''
+
===Overview===
|}
+
Set up your web server; create blank MySQL database; download {{BULink|site-latest.zip}} to your server root and unpack it; import file <code>''path-to-server-root''/backups/ws.sql</code> into your blank MySQL database; edit <code>''path-to-server-root''/w/LocalSettings.php</code> and enter your database name and user credentials; navigate to your web-server root from your web browser to browse your local copy of Wikispooks.
 +
 
 +
====Web server setup====
 +
To do
  
==Overview==
+
====Create new MySQL database====
To host Wikispooks on your machine, you will need:
+
To do
* Some knowledge of running a webserver
 
* Some knowledge of the Mediawiki software
 
* A site-backup set - The necessary backup files are listed above and '''[{{server}}/backups/ here]'''.
 
* A computer with at least 5 Gb of free disk space that runs a web server, including
 
** PHP v 5.3.3 +
 
** MySQL v 5.1.73 +
 
** Lua v 5.1.5 +
 
''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.''
 
  
==Setting up and running a Copy Of The Site==
+
====Download and unpack site backup====
The backups enable you to import all the files, images and text-content of the site into 'Mediawiki'.  
+
*Unzip {{BULink|site-latest.zip}} '''in the web server root directory'''. This will generate many directories and files in and under the web server root.
  
===The 'LocalSettings.php' file===
+
====Import the Wikispooks content into your database====
 +
Import <code>''path-to-server-root/backups/''ws.sql</code> 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.
 +
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
 +
 +
====Configure your ''LocalSettings.php'' file====
 +
To do
  
====Error reporting====
+
==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>
 
::<code>$wgShowSQLErrors = 1;</code>
 
::<code>$wgShowSQLErrors = 1;</code>
 
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.
 
==Getting the wikispooks site content and files/images into Mediawiki==
 
Proceed as follows:
 
*Unzip {{BULink|site-latest.zip}} '''in the web server root directory'''. This will generate many directories and files in and under the web server root.
 
*Import <code>ws.sql</code> 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.
 
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
 
  
 
===Finishing Touches===
 
===Finishing Touches===
Line 60: Line 54:
  
 
==Running A Live Site Mirror==
 
==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 <code>admin[at]wikispooks.org</code> and encrypted with [[WikiSpooks:PGP Public Key|'''this key''']].
 
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 <code>admin[at]wikispooks.org</code> and encrypted with [[WikiSpooks:PGP Public Key|'''this key''']].
 
==Notes==
 
'''The following items are ''not'' included in the backup:'''
 
* '[[ISGP Archive]]' - the full ISGP archive is available from https://wikispooks.com/ISGP/ISGP_site_backup.zip (136MB)
 
* The 'Anon Uploads Form'
 
* 'ACH sytem'
 
* 'Piwik stats'
 
* Wikileaks 'Cablegate Mirror'
 
* Wikileaks 'Torrents'
 
  
 
===Known Issues===
 
===Known Issues===

Revision as of 08:42, 4 June 2015

Tools.png Page overhaul in progress - aim to complete 4-June-15 --Peter P (talk) 20:31, 3 June 2015 (IST)

SiteBackup.png

Even if you are a casual reader and not a contributor to the wikispooks project, you are encouraged to download and keep a backup copy of the site (~2.9Gb) in case it goes offline for any reason. The site is open licenced so you are free to copy it's content and publish it elsewhere, either as an exact mirror or as part of another website. The more people around the world who keep a backup, the better the odds that the site content will not be lost.

Content of the 'Backups' directory

  • Available files are listed in the Backup files list box on the right. The main site backup files are in the form site-YYYY-MM-DD.zip indicating the date taken and there will usually be at least 4 generations of them. The file site-latest.zip links to the most up-to-date of the site backups.
  • wikileaks.zip contains Bit-Torrent files for the entire wikileaks site between it's original launch in 2006 to February 2010.
  • From time-to-time there may be other Wikispooks project-related files made available for download.

Notes

The following items are not included in the main site backup files:

  • The 'Anon Uploads Form'
  • 'Piwik stats'
  • Wikileaks 'Torrents' - Separate download here

Setting up and running a Copy Of The Site

A single main site backup file contains everything needed to run a copy or mirror of the Wikispooks site on a suitably configured web server. Apache is the web server used by Wikispooks and assumed in these instructions although NginX, IIS and other web servers can be configured to run Mediawiki.

N.B. Either WampServer or Xampp provides all the Apache web-server software need to run the Wikispooks site locally on either a Linux or Windows machine.

Overview

Set up your web server; create blank MySQL database; download site-latest.zip to your server root and unpack it; import file path-to-server-root/backups/ws.sql into your blank MySQL database; edit path-to-server-root/w/LocalSettings.php and enter your database name and user credentials; navigate to your web-server root from your web browser to browse your local copy of Wikispooks.

Web server setup

To do

Create new MySQL database

To do

Download and unpack site backup

  • Unzip site-latest.zip in the web server root directory. This will generate many directories and files in and under the web server root.

Import the Wikispooks content into your database

Import path-to-server-root/backups/ws.sql 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

Configure your LocalSettings.php file

To do

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.

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.

Known Issues

  • Some of the in-text links (especially on 'Category:IFrame' pages) may 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 URLs 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)
Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png
Wikispooks
Technical
SMW.png Help.png