DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:recreate_wiki_change_log

This is an old revision of the document!


Rebuilding a Wiki Change Log

DokuWiki stores the wiki changes listing in the file, data/meta/_dokuwiki.changes. The number and duration of changes stored in that file are controlled by two configuration options:

Each individual page in your wiki also has its own change listing file, data/meta/namespace/pagename.changes.

The information in the single page files has the same format (see below) as the information in the wiki wide file, meaning it is possible to recreate the complete wiki change listing by concatenating all the individual pages files together.

linux command to recreate wiki changes file

find data/meta -name '*.changes' ! -name '_media.changes' -exec cat '{}' \; | sort -u > data/meta/_dokuwiki.changes

(assumes current directory is dokuwiki install directory and a standard install)

A faster version of above command1) (marcink 2016-05-06):

find data/meta -name '*.changes' ! -name '_media.changes' -print0 | xargs -0 cat | sort -u > data/meta/_dokuwiki.changes

If you are using the discussion plugin, make sure to include ! -name '_comments.changes' before -print0 in above command.

change listing format

date stamp      ip address of editor   flag*   namespace & page file name     user**     change comment
-------------------------------------------------------------------------------------------------------
1206836149      1.2.3.4                C       sandbox:divalign               me         created

* flag indicating change type, e.g. C=created, D=removed, E=edited.
** blank if an anonymous edit

1)
using -exec will run 'cat' for every found file, where piping to xargs will run 'cat' few times at most
tips/recreate_wiki_change_log.1462553865.txt.gz · Last modified: 2016-05-06 18:57 by marcink

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki