Release status: beta
|License||No license specified|
See SVN ($Id: Backup.doc.wikitext 786 2007-09-16 19:34:52Z jeanlou.dupont $)
|Check usage and version matrix|
Defines a new hook 'backup' as a service to backup extensions.
- Creation (done)
- Update (done)
- Delete (done)
- Move (done)
- Protection (done)
- Upload (done)
- Re-upload (done) (same as upload)
- Delete (done)
- Move (not allowed - hence, nothing to implement)
- Log (done)
This extension is meant to serve other extensions. It is not meant to be used 'standalone'.
Theory Of Operation 
Page change events are trapped and the corresponding 'Recent Change Identifier' (i.e. rc_id) field is attached to a 'backup_operation' object. Trapping is done through the 'RecentChange_save' hook. The 'revision' information is the critical information: every page change is associated with a unique 'revision id'.
When a complete 'backup_operation' is ready, the event 'backup' is fired (i.e. the hook 'backup' is called).
- StubManager extension
- (optional) patched Article.php
- (optional but strongly recommended) Extension:ImagePageEx
See the Mediawiki Extension table entry "download" above.
Extension:ExtensionManager: See footnote
- Add the following to LocalSettings.php, if the extension was downloaded from Jean-Lou Dupont's MediaWiki SVN directory (link in the download entry of the table above):
require_once( "$IP/extensions/Backup/Backup.php" );
- Since this Extensions is depending on StubManager, add the line after the StubManager include, or else your Wiki won't work.
Upgrades through PEAR 
Sometimes, it is necessary to clear PEAR's cache in order to perform upgrades.
or use the force method:
PEAR Web Frontend 
RSS feed 
To keep up-to-date with this channel, use the following RSS feed__.
Consult User Jldupont's page.
- The most recent release is always available through the extension's PEAR and SVN repositories. This page is not necessarily up-to-date.
- Extension:ExtensionManager does not require any modification to LocalSettings.php because ExtensionManager includes the extension.
Note that if PHP code caching is in place (e.g. APC, eAccelerator), then to successfully complete the installation a cache flush might be needed.
- Modifications to
LocalSettings.phpis only necessary if not using Extension:ExtensionManager
- If desired, an updated 'includes/Article.php' file can be installed. See Extension:Backup#Article.php patch.
- If desired but strongly recommended, Extension:ImagePageEx should be installed in order to properly
process deletion in the NS_IMAGE namespace.
Article.php patch 
MediaWiki by default purges the 'recent changes' table for entries related to a delete article/image. This behavior introduces some rather annoying side effects to this extension. A patched copy of Article.php can be downloaded from BizzWiki's repository.
- no 'ArticleDelete' event is fired.
- recent changes table is cleared of any related entries
- log entry is created
Revision Identifier 
Verify that the 'revision id' information is safely trapped:
- Creation || ArticleSave || rev_id OK
- Update || ArticleSave || rev_id OK
- Delete || ArticleDeleteComplete || rev_id OK
- Move || SpecialMovepageAfterMove || rev_id OK (set to latest ID of source title)
- Protection || ArticleProtectComplete || rev_id OK
- Log || RecentChange_save || rev_id *NOT NEEDED*
- Upload || FileUpload || rev_id OK
- Delete || ImageDoDeleteBegin || rev_id OK
- Re-upload || FileUpload || (done) (same as upload)
- Move (OK as it is not allowed anyway)