メモ/moin管理について、ここに記述してください。

実行したのはこれ。

# moin --config-dir=/service/wiki --wiki-url=http://moin.qmail.jp/ maint reducewiki -t 2015

2015-12-19 08:09:42,318 INFO MoinMoin.log:151 using logging configuration read from built-in fallback in MoinMoin.log module
2015-12-19 08:09:42,318 INFO MoinMoin.log:157 Running MoinMoin 1.9.8 release code from /usr/local/lib/python2.6/site-packages/MoinMoin
2015-12-19 08:09:42,479 INFO MoinMoin.config.multiconfig:93 using farm config: /service/wiki/farmconfig.pyc
2015-12-19 08:09:42,752 INFO MoinMoin.config.multiconfig:127 using wiki config: /service/wiki/mywiki.pyc

データ量は500MBあったのが180MBまで減った。-- ToshinoriMaeno 2015-12-18 23:26:37

1. reducewiki

%moin maint reducewiki --help                                                     /var/log
2015-12-19 01:11:06,558 INFO MoinMoin.log:151 using logging configuration read from built-in fallback in MoinMoin.log module
2015-12-19 01:11:06,558 INFO MoinMoin.log:157 Running MoinMoin 1.9.8 release code from /usr/local/lib/python2.6/site-packages/MoinMoin
MoinMoin Help - maint/ reducewiki

Purpose:
========
This tool allows you to reduce a data/ directory to just the latest page
revision of each non-deleted page (plus all attachments).

This is used to make the distributed underlay directory, but can also be
used for other purposes.

So we change like this:
    * data/pages/PageName/revisions/{1,2,3,4}
        -> data/pages/revisions/1  (with content of 4)
    * data/pages/PageName/current (pointing to e.g. 4)
        -> same (pointing to 1)
    * data/pages/PageName/edit-log and data/edit-log
        -> do not copy
    * data/pages/PageName/attachments/*
        -> just copy

Detailed Instructions:
======================
General syntax: moin [options] maint reducewiki [reducewiki-options]

[options] usually should be:
    --config-dir=/path/to/my/cfg/ --wiki-url=http://wiki.example.org/

[reducewiki-options] see below:
    0. To create a wiki data/ directory with just the latest revisions in the
       directory '/mywiki'
       moin ... maint reducewiki --target-dir=/mywiki

Command line reference:
=======================
Usage: moin [command] [general options] command subcommand [specific options]

Options:
  --version             show program's version number and exit
  -q, --quiet           Be quiet (no informational messages)
  --show-timing         Show timing values [default: False]
  --config-dir=DIR      Path to the directory containing the wiki
                        configuration files. [default: current directory]
  --wiki-url=WIKIURL    URL of a single wiki to migrate e.g.
                        http://localhost/mywiki/ [default: CLI]
  --page=PAGE           wiki page name [default: all pages]
  -t TARGET_DIR, --target-dir=TARGET_DIR
                        Write reduced wiki data to DIRECTORY.