How to Find Pages with most Historic Versions in Confluence

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

Affected Versions:

This documentation was tested using Confluence 6.2.1 but it is supposed to work on all versions.

目的

As described in the Page History and Page Comparison Documentation, Confluence tracks the history of changes to each page by creating a new version of the page each time it's modified, allowing users to view the changes between different versions, and roll back to a previous version upon need. The historic entries are actually pages that remain stored in the database and sometimes, Confluence instances may have several historic pages saved in the backend, which may not be in use and that are not automatically purged. That being said, it's interesting to know which pages are holding the larger number of historic pages behind it in order to perform a manual clean-up activity.

ソリューション

You can run below query in your database to get a list of the TOP 25 Pages with more Historic Version behind them. The idea is to pretty much pick up pages from content table with the biggest count inside the version column. This query was tested with PostgreSQL only and syntax may vary according to your database.

select title,MAX(version) from content where contenttype = 'PAGE' group by title order by 2 desc limit 25;

After you get the page Title, you may search for it and use UI to Delete Page History.

最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.