DokuWikiで情報発信

個人での情報発信や社内での情報共有に便利なDokuWikiを紹介するサイトです。

ユーザ用ツール

サイト用ツール


サイドバー

目次

DokuWikiを理解

DokuWikiの構築

よく確認するページ

· 最終更新: 2017/11/23 by oreda admin



「DokuWikiの使い方」に戻る

DokuWikiの以前のリビジョン(履歴)削除

特定のリビジョンを削除する

一覧から削除

./data/meta/<namespace>.changes というメタファイルを編集します。

データの削除

<dokuwiki>/data/attic/<namespace>/<attic file>


スクリプトで削除

https://www.dokuwiki.org/tips:maintenance

data/attic
data/media_attic
以前のリビジョン(屋根裏部屋)
data/cache キャッシュファイル
data/index 検索インデックス
data/locks ロックファイル
data/media メディアファイル
data/meta
data/media_meta
メタデータ
data/pages ページファイル
#!/bin/bash
 
function cleanup()
{
    local data_path="$1"        # full path to data directory of wiki
    local retention_days="$2"   # number of days after which old files are to be removed
 
    # purge files older than ${retention_days} days from attic and media_attic (old revisions)
    find "${data_path}"/{media_,}attic/ -type f -mtime +${retention_days} -delete
 
    # remove stale lock files (files which are 1-2 days old)
    find "${data_path}"/locks/ -name '*.lock' -type f -mtime +1 -delete
 
    # remove empty directories
    find "${data_path}"/{attic,cache,index,locks,media,media_attic,media_meta,meta,pages,tmp}/ \
        -mindepth 1 -type d -empty -delete
 
    # remove files older than ${retention_days} days from the cache
    if [ -e "${data_path}"/cache/?/ ]
    then
        find "${data_path}"/cache/?/ -type f -mtime +${retention_days} -delete
    fi
}
 
# cleanup DokuWiki installations (path to datadir, number of days)
# some examples:
 
cleanup /home/user1/htdocs/doku/data    256
cleanup /home/user2/htdocs/mywiki/data  180
cleanup /var/www/superwiki/data         180
7 0 * * *   root  /full/path/to/cleanup.sh


cleanupプラグインを使う

https://www.dokuwiki.org/plugin:cleanup

プラグインで使用されるデフォルト期間は以下のとおりです:

キャッシュファイル 3ヶ月
ページの改訂履歴 2ヶ月
メディアの改訂履歴 1ヶ月
親のいないページのメタデータ 3ヶ月
親のいないメディアのメタデータ 2ヶ月
古いロックファイル 30分


参考




· 最終更新: 2017/11/23 by oreda admin

ページ用ツール