Currently Confluence does not support renaming or copying spaces through the user interface. You may wish to vote towards these feature requests:

Use The Copy Space Plugin

The best option is to install the Copy Space Plugin.

(warning) Note that this plugin is still in beta release, and is not officially supported by Atlassian.

Read the developer's notes in the Atlassian blogs.

Manually Clone Or Rename A Space

対象のスペースの XML バックアップを編集することで、スペースを手動で複製または名前変更することもできます。

注意

  • May require manually updating external links to that space.
  • The instructions have been confirmed for Confluence 2.2 onwards. Users running older versions are recommended to upgrade Confluence before continuing.
  • Where examples are given, they involve changing oldkey:Old Space Name into newkey:New Space Name. You need to substitute your own keys for oldkey and newkey, and your own space names for Old Space Name and New Space Name.
  • When importing a space export for a space that already exists, the previous space content will be overwritten.
  • Read the process in full before beginning.

第 1 段階: スペースの名前変更

  1. Select a new, unique space key and name for the second space. Space keys may only consist of ASCII letters or numbers (A-Z, a-z, 0-9) and no empty spaces are allowed in the key.

  2. Clone your production Confluence instance to a test server on another computer now. You should now have a production server and test server both containing the same data and can avoid the risk of corrupting your production Confluence instance.

  3. On the test server, login as an administrator.

  4. Go to Browse Space -> Advanced -> Export Space and export the target space as XML including attachments.

  5. スペースのバックアップを保存します。

  6. Open the space backup file with a zip file editor and find the file entities.xml.

  7. Edit entities.xml in a text editor.

  8. Do a 'Search & Replace' on the old space name as shown below. Swap out Old Space Name and New Space Name for the actual names.

    検索対象

    置換先

    [CDATA[Old Space Name]

    [CDATA[New Space Name]


  9. Do a 'Search' for any occurrences of the old space name that occur in user content. You may wish to replace some or all of these references with the new space name. Replace Old Space Name and New Space Name with the actual names.

    検索対象

    Old Space Name


  10. Do four 'Search & Replaces' on each of the references to the old space key as shown below. Swap out oldkey and newkey for your actual keys.

    検索対象

    置換先

    [oldkey]

    [newkey]

    spaceKey=oldkey

    spaceKey=newkey

    [oldkey:

    [newkey:

    key=oldkey]

    key=newkey]


    例:

    Space name : Test Space
    Space key : test
    New space name : Test Space 2
    New space key : test2
    <property name="name"><![CDATA[Test Space]]></property>
    <property name="key"><![CDATA[test]]></property>
    

    The above search and replace ensures that you will change the test oldkey to test2, and change the "Test Space* Old Space Name to Test Space 2.
  11. Save the modified entities.xml.

  12. Overwrite the original entities.xml in the space backup with the modified version.

  13. Login to the test instance as a Confluence administrator.

  14. Go to Administration -> Backup & Restore. Under 'Upload a zipped backup to Confluence', browse to select to the modified space backup. Check the 'Build index' option and select 'Upload & Restore'.

  15. 復元プロセスが完了したら、新しいスペースにアクセスし、ページ、内部リンク、および添付ファイルにアクセスできることを確認します。この段階でエラーが発生する場合、検索および置換が適切に行われていないため、ステップ 2 から再度やり直す必要があります。

第 2 段階: 本番環境への復元

  1. 本番環境インスタンスのバックアップを作成します。

  2. Login to the production instance as a Confluence administrator.

  3. Go to Administration -> Backup & Restore. Under 'Upload a zipped backup to Confluence', browse to select to the modified space backup. Check the 'Build index' option and select 'Upload & Restore' If any data loss occurs as a result of using this workaround, immediately revert to the backup.

  4. 復元プロセスが完了したら、新しいスペースにアクセスし、ページ、内部リンク、および添付ファイルにアクセスできることを確認します。この段階でエラーが発生した場合、サイト バックアップに戻す必要があります。

  5. If renaming a space, you can delete the old space by going to Browse Space -> Space Admin -> Remove Space. Click OK to remove the old space.

第 3 段階: スペース参照の名前変更

ほかのスペース内にある、古いスペースへのリンクは変更されずに残ります。スペースの名前変更を行う場合、これらのリンクが新しいスペースを参照するように変更する必要があります。スペースをコピーする場合、この段階をスキップして、リンクが元のスペースを参照するようにすることもできます。

これらのリンクの変更は、すべてのリンクを変更するか、一部のみを変更するかに応じて異なります。すべてのリンクを変更する必要がない場合や、本番環境インスタンスを停止したくない場合は、各ページを手動で変更する必要があります。すべてのリンクを変更する必要がある場合、次の手順をご利用ください。

  1. Create a site XML backup including attachments from Administration -> Backup & Restore.

  2. サイトの XML バックアップ ファイルを保存します。

  3. 本番環境インスタンスを停止します。

  4. サイト バックアップのコピーを 2 つ作成します。1 つのコピーを、オリジナルの未変更のバックアップとして保持し、もう片方を変更します。変更対象を確認できるよう、バックアップの名前を変更します。

  5. Open the copy for modification and edit entities.xml.

  6. Do four 'Search & Replaces' on each of the references to the old space key as shown below. Swap out oldkey and newkey for the actual keys

    検索対象

    置換先

    [oldkey]

    [newkey]

    spaceKey=oldkey

    spaceKey=newkey

    [oldkey:

    [newkey:

    key=oldkey]

    key=newkey]


  7. Save the updated entities.xml back into the modified site XML backup file

  8. 本番環境を開始します。

  9. Import the modified site XML backup from Administration -> Backup & Restore. If you have any problems, revert to the original unmodified backup and redo the links manually instead

これで完了です。

Copy Space Template: There is a feature request being tracked at CONF-4538.