Difference between revisions of "Backing up the wiki"

Jump to navigation Jump to search
Line 3: Line 3:
 
Run the the [https://github.com/WikiTeam/wikiteam WikiTeam] Python script [https://github.com/WikiTeam/wikiteam/blob/master/dumpgenerator.py dumpgenerator.py] from the command-line to get an XML, with edit histories, dump and a dump of all images plus their descriptions.  
 
Run the the [https://github.com/WikiTeam/wikiteam WikiTeam] Python script [https://github.com/WikiTeam/wikiteam/blob/master/dumpgenerator.py dumpgenerator.py] from the command-line to get an XML, with edit histories, dump and a dump of all images plus their descriptions.  
  
This doesn't backup extensions or their configuration.<!-- templates, css, js -->
+
A XML dump does not create a full backup of the wiki database, the dump does not contain user accounts, etc. Extensions and their configuration are also not backed up.<!-- templates, css, js -->
  
 
<code><nowiki>python dumpgenerator.py --api=http://www.sdiy.info/w/api.php --xml --images</nowiki></code>
 
<code><nowiki>python dumpgenerator.py --api=http://www.sdiy.info/w/api.php --xml --images</nowiki></code>
Line 24: Line 24:
 
* Open your wiki with a web browser e.g. <code><nowiki>http://www.sdiy.info/w/</nowiki></code>
 
* Open your wiki with a web browser e.g. <code><nowiki>http://www.sdiy.info/w/</nowiki></code>
 
* Follow the<code>set up the wiki</code>link. Complete the steps that follow. Leave most options at defaults.
 
* Follow the<code>set up the wiki</code>link. Complete the steps that follow. Leave most options at defaults.
 +
* The LocalSettings.php file must be copied onto the server wiki folder.
 +
* Also upload the XML dump and images folder to the server
 +
* <code>php  public_html/w/maintenance/importDump.php <  public_html/sdiyinfo_w-yyyymmdd-history.xml</code> 
 
To be continued ...
 
To be continued ...
 
<!-- * <code></code>
 
<!-- * <code></code>

Revision as of 09:05, 24 August 2016

Backing up the wiki without server shell access, requires Python v2 (v3 doesn't yet work).

Run the the WikiTeam Python script dumpgenerator.py from the command-line to get an XML, with edit histories, dump and a dump of all images plus their descriptions.

A XML dump does not create a full backup of the wiki database, the dump does not contain user accounts, etc. Extensions and their configuration are also not backed up.

python dumpgenerator.py --api=http://www.sdiy.info/w/api.php --xml --images

Full instructions are at the WikiTeam tutorial.

Restoring from backup με λίγα λόγια

Assumes economical shared Linux hosting, with jailed shell access. Maybe out of date by now.

See MediaWiki.org for a more detailed explanation.

  • Use cPanel > MySQL to create db e.g. wiki, user e.g. root, grant all privileges to the user and set a password e.g. Whatever123
  • SSH into your server
  • cd public_html
  • wget http://download.wikimedia.org/mediawiki/x.xx/mediawiki-x.xx.tar.gz (replacing x.xx as apropriate for current version).
  • tar -xpzf mediawiki-x.xx.tar.gz
  • rm mediawiki-x.xx.tar.gz
  • mv mediawiki-x.xx/ w (don't put wiki pages in the root directory of the site)
  • Open your wiki with a web browser e.g. http://www.sdiy.info/w/
  • Follow theset up the wikilink. Complete the steps that follow. Leave most options at defaults.
  • The LocalSettings.php file must be copied onto the server wiki folder.
  • Also upload the XML dump and images folder to the server
  • php public_html/w/maintenance/importDump.php < public_html/sdiyinfo_w-yyyymmdd-history.xml

To be continued ...