[pmwiki-users] Reverting a PmWiki Site and its History to an Older State
Patrick R. Michaud
pmichaud at pobox.com
Fri Mar 4 07:48:34 CST 2005
On Fri, Mar 04, 2005 at 03:16:59PM +0200, Shlomi Fish wrote:
> On Wednesday 02 March 2005 23:10, Patrick R. Michaud wrote:
> > Unfortunately, due to the way 0.6.7 stores the page history it
> > might not be possible to reliably automatically revert the pages,
> > depending on what the spammers have done.
> Well, I can determine a date-time stamp in which everything was OK, and would
> like to revert all the pages to this exact stamp. Would this be helpful?
The issue isn't one of knowing when the problem occurred, it's one
of the page history format not being as robust as we might like.
> > How many pages have been affected?
> Almost all of them.
How many is that?
> Is the format of 0.6.x pages documented somewhere, so I
> can create a script to do this?
No, it's not documented anywhere, but it's also pretty easy to figure out.
The current version of the text is on a line that begins with 'text=...' .
The page history itself is in lines that have the form
where the '...' represents the output of diff(1) used to create the
diffs. To get back to a previous version, PmWiki simply applies the diffs
in reverse sequence until the desired timestamp is reached. Versions
older than 1.0.10 use an external patch(1) command to apply the diffs;
versions since then have a built-in patch function.
More information about the pmwiki-users