How to Archive a Confluence Space

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

目的

Regarding spaces, it may come to a point that one or more spaces are not used anymore and you need to archive it. While the best and most pain-free way of doing it would be by leveraging Confluence feature about Retention Rules sometimes you need to do that using a script or custom automated way.

This KB intends to help you understand the possible ways of doing that. 

Informational

There are two statuses for a Space – Current and Archived. While you can change this status via the UI, it could be more efficient to bulk edit this status for a large number of spaces by scripting it.

Archiving a space can be useful when the contents of the space are no longer relevant, so these spaces become less visible on your Confluence site. Archiving a space gives you the option to access the space contents at a later time whenever needed.It is also easy to revert an archived space to current again at any time.

ソリューション

We have a few options to achieve this, and here we will discuss each of them.

Archive space via the Confluence UI

This is the most straightforward method but it does not provide a way to do it in bulk.
You can check our official documentation about how to Archive a Space for more information about how does that work.


Regarding a space archiving of multiple spaces simultaneously, there is an open suggestion to implement this feature under CONFSERVER-83273 - Getting issue details... STATUS  

Archive space directly in the Database

このクエリでは、アーカイブしたいスペースの spacekey は既に分かっているものとします。使用されていないスペースを確認するクエリは、「未使用スペースを検索する」ページを確認してください。

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. Confluence を終了します。

  2. スペースのステータスを変更するには、以下のクエリを使用できます。<spacekey> は、変更したい対象の spacekey に置き換えてください。

    UPDATE spaces 
    SET spacestatus = 'ARCHIVED' 
    WHERE spacekey = '<spacekey>';
    1. 同じクエリを使用し、spacestatus の値を「CURRENT」に置き換えるだけで、スペースのステータスを アーカイブ済み から 現在 に戻すことができます。

    2. 使用している DBMS によっては、構文を調整する必要がある可能性があります。上記のクエリは PostgreSQL 用に記述されています。 

  3. Confluence を起動します。

  4. 変更が反映されない場合には、「キャッシュ管理」にて Confluence のキャッシュをクリアしてください。

Archive space using REST API

There is no available way to archive an space via REST API at this moment.

We do have an open suggestion for this under  CONFSERVER-83215 - Getting issue details... STATUS

Make sure to comment and vote on the mentioned suggestions so they can have a better chance of being implemented. For more info on how that is defined, please check our Bug Fix Policy

最終更新日: 2024 年 1 月 17 日

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

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