Difference between revisions of "Wikispooks:Site Backup"

From Wikispooks
Jump to navigation Jump to search
m (→‎Notes: edits)
(Clarify)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
'''Wikispooks content renders it less than welcome to powerful interests which may put it at greater than average risk of disruption - legal or otherwise.'''
 
  
A full site backup is therefore available to ensure that, should the site - for whatever reason - become unavailable, a reasonably up to date version of it will be held by many people in multiple locations such that it can avoid the 'black-hole' fate that has overtaken other dissident sites - notably [[Joe Vialls]]. It should also demonstrate that the site is genuinely open, crowd sourced and free from proprietorial interest and control, other than to police its original editorial policy and project purposes (See [[WikiSpooks:Community portal|the project pages]] for full information).
+
'''Even if you are a reader only and not a contributor to this project, you are encouraged to download and keep a [https://wikispooks.com/backups/wikispooks-latest.zip backup copy] of this site in case of technical or other problems'''
  
With a modicum of technical know-how the backups can be restored to a local machine or simply archived as an insurance against its present iteration disappearing. Anyone setting up a local site can ask to have it configured to automatically synchronise with the main site so that the local copy is always current - email admin[at]wikispooks.org, encrypted with [[WikiSpooks:PGP Public Key|'''this key''']], for the necessary credentials etc. - '''NB''' credentials will only be sent by encrypted email.
+
Site backups are published daily 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 has an open licence (see [[WikiSpooks:Copyrights]]) so you may copy the information and publish it elsewhere, whether as an exact mirror or as part of another website.
  
==Backup files==
+
==Running A Copy Of The Site==
There are two zip files which which together contain a complete site backup (click to download):
+
To host Wikispooks on your machine, you will need:
 +
* A recent site-backup. '''[https://wikispooks.com/backups/wikispooks-latest.zip Get the latest backup from here]''', or browse the [[https://wikispooks.com/backups/ backups folder]] for earlier backups.
 +
* A  computer with at least 5Gb of free disk space that runs a web server, including
 +
** PHP v 5.0 +
 +
** MySQL v 5.0 +
 +
'''N.B.''' Either WampServer or Xampp will be all the software you need to run the Wikispooks site locally.
 +
* Some knowledge of running a webserver
  
#'''[https://wikispooks.com/backups/wsdirs.zip wsdirs.zip]''' (@ 2.1Gb) - The entire directory structure and files on the Wikispooks web server. This file is updated on an ad-hoc basis - hopefully at least one per month.
+
===Basic Instructions===
#'''[https://wikispooks.com/backups/ws.zip ws.zip]''' (@ 185Mb) - This zip contains the following 3 files:
+
*Unzip the wikispooks backup file to a web server root directory.
##readme.txt - Instructions (containing much the same information as this page)
+
*Create a new blank MySQL database
##ConfigParams.txt - Configuration parameters for appending to the  'LocalSetting.php' file  generated by the Mediawiki install procedure.  
+
*Locate the <code>backups/ws.sql</code> for restoring the Wikispooks MySQL database
##ws.sql - The Wikispooks MySQL database dump
+
*Create a dedicated database user with full privilages; note this username and password.
 +
*Import the ws.sql database dump into the new database. '''Note:''' The file is too large for a default configuration of phpMyAdmin to handle. You may wish to use a MySQL command for this, e.g.
 +
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
  
====Backup files - further info====
+
===Modifying <code>LocalSettings.php</code>===
*The '''wsdirs.zip''' file contains everything needed to reconstitute the Wikispooks site on any web server running both php and MySQL. The main Wikispooks machine runs the Apache web server. There will be a number of Apache config parameters that need setting in order for 'pretty urls' to work properly. Full details can be found on the [http://www.mediawiki.org/wiki/MediaWiki Mediawiki web site]. It should be possible to run the site using other web servers but it has only been tested with Apache 2.2.15
 
*The '''ws.sql''' file is for restoring the Wikispooks MySQL database. It can be used to set up a basic installation if you install Mediawiki separately first. However, to function properly, many Mediawiki extensions will also need to be installed (see below). It does NOT include any pdf, image or other files needed for a fully functioning version of the site.
 
  
==Overview of the Wikispooks 'Mediawiki' software configuration==
+
The <code>LocalSettings.php</code> file is included in the backup, but the <code>LocalSettings.passwords.php</code> file which it includes is omitted from the backup for obvious security reasons. If you are familiar with SQL databases, definitely the quickest way to get your system working is to read the notes at the top of <code>LocalSettings.php</code>, and ammend it with the access credentials above to fit your database.
* Current installed version 1.16.3
 
* There are many Mediawiki extensions in use on the site. In particular 'Widgets', 'Semantic MediaWiki', 'Semantic Forms', 'News', 'DynamicPageList' and 'Category Tree' are fundamental to the proper display and operation of the site. All the software extensions are included in the '''wsdirs.zip''' file
 
  
==System requirements for local site operation==
+
===Using the Default MediaWiki Setup===
* A smokey machine running a web server (The main Wikispooks site runs Apache v2.2.15)
+
If you experience trouble with the above method, you may resort to the standard Mediawiki setup procedure. This is not recommended since it is more work. 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:
* php v 5.0 +
+
# The database - import from the SQL dump at <code>backups/ws.sql</code> whicih will add the pages to the Wiki
* MySQL v 5.0 +
+
# 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 in the backup, but must be included from the <code>LocalSettings.php</code> file to be operational
* at least 5 Gb of free disk space
 
'''Note:''' both WampServer and Xampp (Google them) provide all the server software needed to run the Wikispooks site  locally.
 
  
==Basic installation instructions==
+
===Finishing Touches===
*Unpack '''wsdirs.zip''' to a web server root directory. '''Note:''' The file unpacks to a single directory called 'httpdocs'. This is the server root of the current Wikispooks machine. Either make it your server root or copy its contents to your server root.
+
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 [http://www.mediawiki.org/wiki/MediaWiki Mediawiki web site].
*Create a new blank MySQL database
 
*Create a dedicated database user with full privilages; note this user name and password.
 
*import the ws.sql database dump into the new database. '''Note:''' The file is too large for a default configuration of phpMyAdmin to handle. It is therefore recommended that the MySQL command line be used -  something like:
 
::<code>$ mysql -u username -p password -h localhost data-base-name < ws.sql </code>
 
  
==Important==
+
==Running A Live Site Mirror==
In order to safeguard the main site database credentials, there is no 'LocalSettings.php' file included in the backup.  To get your system working, you will need to go through the standard Mediawiki setup procedure which should initiate when you access the /site-root/w/config' directory with a browser. Successful completion of this prodedure will create a '.../w/LocalSettings.php' file. This is a basic configuration file which will NOT include any of the required extension and other configuration parameters. To complete the configuration and install the required extensions proceed as follows:
 
  
#Open 'LocalSettings.php' in a text editor.
+
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''']].
#Copy and paste the entire contents of the 'configParams.txt' file to the end of the 'LocalSettings.php' file
 
#Save the modified file
 
  
 
==Notes==
 
==Notes==
* The Wikispooks installation is set up such that none of its media files (ie pdf's, doc's jpg's avi's etc) are held in the MySQL database. The database only contains pointers to these files. The files themselves are held in the directory structure below 'server root/w/images' (a bit counter-intuitive, but there you go)
+
'''The following items are ''not'' included in the backup:'''
'''The following items are not included in the backup:'''
+
* 'ISGP archive' - a zip file of the full ISGP archive is available [https://wikispooks.com/ISGP/ISGP_site_backup_Jan_2013.zip '''here''']
* In the Anonymity/Privacy' menu:
+
* The 'Anon Uploads Form'
** 'Anon Uploads Form'
+
* 'ACH sytem'
* In the 'Miscellaneous' menu:
+
* 'Piwik stats'
** 'ACH sytem'
+
* 'Cablegate Mirror'
** 'Piwik stats'
+
* 'Torrents'
** 'ISGP archive' - a zip file of the full ISGP archive is available [https://wikispooks.com/ISGP/ISGP_site_backup_Jan_2013.zip '''here''']
 
* In the 'Wikileaks resources' menu:
 
** 'Cablegate Mirror'
 
** 'Torrents'
 
* 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.
 
  
 +
===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? - Please use [[WikiSpooks talk:Site Backup|this discussion page]]'''
 
*'''Suggestions, Queries etc? - Please use [[WikiSpooks talk:Site Backup|this discussion page]]'''

Revision as of 16:23, 28 March 2013

Introduction

Even if you are a reader only and not a contributor to this project, you are encouraged to download and keep a backup copy of this site in case of technical or other problems

Site backups are published daily 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 has an open licence (see WikiSpooks:Copyrights) so you may copy the information and publish it elsewhere, whether as an exact mirror or as part of another website.

Running A Copy Of The Site

To host Wikispooks on your machine, you will need:

N.B. Either WampServer or Xampp will be all the software you need to run the Wikispooks site locally.

  • Some knowledge of running a webserver

Basic Instructions

  • Unzip the wikispooks backup file to a web server root directory.
  • Create a new blank MySQL database
  • Locate the backups/ws.sql for restoring the Wikispooks MySQL database
  • Create a dedicated database user with full privilages; note this username and password.
  • Import the ws.sql database dump into the new database. Note: The file is too large for a default configuration of phpMyAdmin to handle. You may wish to use a MySQL command for this, e.g.
$ mysql -u username -p password -h localhost data-base-name < ws.sql

Modifying LocalSettings.php

The LocalSettings.php file is included in the backup, but the LocalSettings.passwords.php file which it includes is omitted from the backup for obvious security reasons. If you are familiar with SQL databases, definitely the quickest way to get your system working is to read the notes at the top of LocalSettings.php, and ammend it with the access credentials above to fit your database.

Using the Default MediaWiki Setup

If you experience trouble with the above method, you may resort to the standard Mediawiki setup procedure. This is not recommended since it is more work. To use this, rename LocalSettings.php LocalSettings.php.backup 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:

  1. The database - import from the SQL dump at backups/ws.sql whicih will add the pages to the Wiki
  2. The basic LocalSettings.php 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 in the backup, but must be included from the LocalSettings.php file to be operational

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:

  • 'ISGP archive' - a zip file of the full ISGP archive is available here
  • The 'Anon Uploads Form'
  • 'ACH sytem'
  • 'Piwik stats'
  • 'Cablegate Mirror'
  • 'Torrents'

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.