Page MenuHomePhabricator

leave only the current version of each page in the database
Closed, DeclinedPublic

Description

Let's say one loves to use 'php deleteBatch.php && php importTextFile.php'
for each edit, no matter how minor.
This has swollen my
-rw-rw---- 1 35651584 2006-11-08 03:13 /var/lib/mysql/ibdata1
and even the invitingly named maintenance/deleteOldRevisions.php won't
help. There is no command I can find that will just leave only the
current version of each page in ibdata1.


Version: 1.7.x
Severity: minor
OS: Linux
Platform: PC

Details

Reference
bz7896

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:28 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz7896.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

deleteOldRevisions.php will do it, under certain circumstances, and provided the
--delete option is passed. If that doesn't work, give purgeRedundantText.php a
try. Both assume you're storing text in the database and won't affect external
storage clusters.

Incidentally, MediaWiki isn't designed to discard old information in this
manner. If space is an issue, there are several scripts which can compress old
revisions, which might work out safer (deleteOldRevision et al. weren't tested
as thoroughly as I'd like).

Nope,
$ php purgeOldText.php --purge #(no purgeRedundantText.php found)
$ php deleteOldRevisions.php --delete
say 0 inactive items found, 0 old revisions found.
$ ls -og /var/lib/mysql/ibdata1
-rw-rw---- 1 35651584 2006-11-14 23:33 /var/lib/mysql/ibdata1
as big as ever.