File attachments on pages can be retrieved from a backup without needing to import the the backup into Confluence. This is useful for recovering attachments that have been deleted by users.
Both daily and manual backups allow this, as long as the 'Include attachments' property was set. Users wanting to restore pages, spaces or sites should check out the Confluence 2.6 Administrators Guide instead.
Before following the instructions for recovering attachments, please review how backups store file and page information.
バックアップ zip ファイルには、entities.xml、Confluence コンテンツを含む XML ファイル、および添付ファイルを保存しているディレクトリが含まれています。
ページの添付ファイルは、attachments ディレクトリにページと添付ファイル id ごとに保存されています。以下は一覧表示した例です。
Listing for test-2006033012_00_00.zip \attachments\98\10001 \attachments\98\10002 \attachments\99\10001 entities.xml |
attachment ディレクトリ内では、内部にある各番号のディレクトリが1ページであり、その内部にある番号のファイルが1添付ファイルです。ディレクトリの番号はページ id であり、ファイルの番号は添付ファイル id です。たとえば、ファイル \attachments\98\10001 は、ページ id 98 の添付ファイル id 10001 の添付ファイルです。entities.xml を参照して、これらの番号を元のファイル名にリンクさせることができます。entities.xml を使用すると、各ページ id をページ タイトルにリンクさせることもできます。
entities.xml 内では、Attachment オブジェクトが XML で記述されています。この例では、ページ id が98、添付ファイル id が10001で、ファイル名が myimportantfile.doc となっています。XML の他の部分は無視することができます。
<object class="Attachment" package="com.atlassian.confluence.pages"> <id name="id">98</id> <property name="fileName"><![CDATA[myimportantfile.doc]]></property> ... <property name="content" class="Page" package="com.atlassian.confluence.pages"><id name="id">10001</id> </property> ... </object> |
この XML はページを示しています。この例では、ページ id が98で、タイトルが Editing Your Files となっています。XML の他の部分は無視することができます。
<object class="Page" package="com.atlassian.confluence.pages"> <id name="id">98</id> <property name="title"><![CDATA[Editing Your Files]]></property> ... </object> |
以下の手順に従って、各ファイルを個別に名前の変更および Confluence に再アップロードする必要があります。3つの方法のうち1つを選択してください。
復元する必要がある各ファイルの名前がわかっている場合、特に数ファイルだけを復元する場合、この方法がベストです。
特定のページの添付ファイルだけを復元する場合、この方法がベストです。
バックアップが小さく、復元するファイルが、多いまたは内部の添付ファイルすべての場合は、この方法がベストです。
|
To obtain detailed information about lost attachments, location, name and type of the attachments, you may use the findattachments script |