Document toolboxDocument toolbox

How to use Missing Attachments Scanner for Confluence

Introduction

The Missing Attachment Scanner performs a comprehensive background scan on all the attachment files in all spaces (including those in trash).

By identifying the missing attachments, it helps to

  • prevent (unknown) data loss

  • facilitate data recovery with earlier discovery

  • identify any underlying issues

  • reduce the errors logged in Confluence backend

  • fix broken links in the Confluence pages

How to know when attachments are missing

It is not possible to eyeball missing attachments from the Confluence page.

If they are rendered on the Confluence page, you may spot “? Unknown Attachment

Otherwise, you only detect it when a user clicks on the link to download it.
The following error message like this will appear in atlassian-confluence.log

getAttachmentData Could not find data for attachment: Attachment: image2022-1-8 11:48:26.png v.1 (873607111)

Some possible reasons for missing Confluence attachments

  • Files being removed accidentally

  • Files not fully copied over during server migrations or space imports

  • Malicious attacks caused by trojans or ransomware

  • Files quarantined by virus scans with updated virus definition files

  • Errors during the file uploads/deletion

  • Incomplete page move operations ( before Confluence 8.1)

  • File/Folder permissions set wrongly

  • Confluence disk space full

You can also check the Large Attachment Checker to identify the contributors to disk full issue

How to access Missing Attachment Scanner

It can be accessed from the admin sidebar.

How to trigger a scan

Since there may be a lot of attachments in the Confluence instance, we recommend to schedule the scanning during off-peak hours

  1. Click on the pencil icon for Scheduled Time to adjust the time for scanning

  2. The Scan Status will be updated progressively whenever it has scanned 1 new space

When the Rescan button is clicked, it will trigger a fresh new scan

What to do with the results

With the report on missing attachments, admins can try to reinstate back the missing files or delete the corresponding database records.

Reinstate the missing files

  1. Try to locate the file in the quarantine folder or from the backups

  2. Click on the info icon to find the location of the missing attachment

  3. Copy the file back to the location in the Confluence server

  4. Verify that the restored attachment can be downloaded from the Confluence page

Delete the corresponding database record

If the attachment cannot be restored, it will be better to clear the database record with the following steps

  1. Click on the bin icon to delete the database record of the missing attachment

  2. Click on Delete button to confirm

When to trigger a scan

Ideally, we recommend to do a scan

  • before and after a version upgrade

  • before and after any server migration

Related Resources