Extension:Rsync

<?php /*

WARNING
This extension is work in progress.

Purpose
Provides a file based export of all the page changes. The directory containing the files can be used along with 'rsync' to provide backup & restore functionality.

Features

 * Page
 * Creation  (done)
 * Update    (done)
 * Delete    (done)
 * Move      (done)
 * Protection (done)
 * File
 * Upload
 * Re-upload
 * Delete
 * Move      (not allowed - hence, nothing to implement)
 * User
 * Account creation
 * Account options update

Theory Of Operation
Page change events are trapped and the resulting new/updated pages are written to a specified filesystem directory. Trapping is done through the 'RecentChange_save' hook.

New page
File generated:

Edit page
File generated:

Delete page
File generated:

Move page
File generated:

Filename
Format:
 * id: unique identifier generated in the context of the 'RecentChanges' table
 * type: 'new', 'edit' or 'log'
 * new --> new page
 * edit --> edit on a page
 * delete --> page deletion
 * log --> log entry

New Page

 * Do complete export

Edit Page

 * Do complete export

Move Page
A move transaction is the page with the new title enclosed in an xml file WITH a new section 'source_title'.
 * Complete export with 'source_title' section

Delete Page

 * Export but don't 'writeRevision'

Page Restrictions
Needed to superclass 'WikiExporter' and 'XmlDumpWriter' classes.
 * Export but don't 'writeRevision'
 * Added 'restrictions' section to the XML dump

Usage Notes
Make sure that the dump directory is writable.

Dependancy

 * StubManager extension

Installation
To install independantly from BizzWiki:
 * Download Extension:StubManager extension
 * Apply the following changes to 'LocalSettings.php'