Synchronization Plugin

sync plugin by Andreas Gohr
Synchronize two Wiki installs via XMLRPC

Last updated on 2010-03-22. Provides Admin.
Compatible with DokuWiki 2009-12-25+.

Similar to freesync.

Tagged with sync, xmlrpc.

Download and Installation

To download and install the plugin through the plugin manager or manually, please use the download link given above.

Changes

Usage

The plugin needs to be installed on one side only (we're calling it the local side) eg. your laptop. The other wiki (the remote side) needs to have the xmlrpc enabled.

Once installed, the plugin is available in the admin interface.

Profiles

www.splitbrain.org_media_blog_2009-03_sync_screen02.jpg

Before syncing you need to create a Synchronization profile. The following options can be set:

Option Required Description
XMLRPC URL yes The full URL to the XMLRPC API of the remote wiki
Namespace no The namespace that should be synchronized between the two wikis. When none is given, everything is synced
Sync Depth yes By default all namespaces below the above given one are synced. You can restrict it here
Username no A user name at the remote wiki, the sync plugin will login with this name. Only pages readable by this user can be synced
Password no Password for the above user account
What to Sync yes Limit the syncing to pages or mediafiles

Hint: you can define multiple profiles accessing the same remote wiki to be able to selectively sync different parts.

Syncing

www.splitbrain.org_media_blog_2009-03_sync_screen04.jpg

When you select a profile and hit “Start Synchronization”, the plugin will gather a list of files that are different between the local and the remote wiki. It automatically suggests in which direction files should be synced if possible. Files can be:

  • copied from the remote to the local wiki (overwriting existing local pages)
  • copied to the remote from the local wiki (overwriting existing remote pages)
  • or both versions can be kept as is

A link labeled “Diff” next to each page will open a difference view in a popup.

Below the list of changed files a summary can be given which will be used for the recent changes view in the remote and local wiki.

Notes

  • the remote Wiki needs to have the XMLRPC interface to be enabled
  • if the remote Wiki uses the xmlrpcuser option, you need to specify a privileged user in the login config of the sync profile
  • it is not possible to sync a remote namespace to a differently named local namespace as this would break links and such, if you want to sync multiple wikis, it is recommended to install mutliple local wiki instances on your laptop
  • to get through .htaccess password protection, use http://username:password@yourserver.com/dokuwiki/lib/exe/xmlrpc.php as the URL
  • The plugin only syncs content (pages and media) not templates or configuration data

Question

  • Can't sync discussion page properly? When I create a new page containing ”~~discussion~~” syntax in local wiki and sync it to remote wiki, it seems that the discussion area can't appear in remote wiki. I must do the following in remote wiki: delete ”~~discussion~~” syntax and save, then add the syntax and save again.
  • Syncing a single image from my ZWAMP setup on my windows machine to my server causes the sync page to hang, with the progress bar running forever. Running it on WampServer gives some fwrite() errors. Not sure what's going on, but I can't dokuwiki because of this. :( – BP
  • How about the option to skip synchronization of certain namespaces?
 
plugin/sync.txt · Last modified: 2010/08/05 17:45 by 112.205.150.193
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate