Guidelines for Determining Which Attachments Can Be Deleted from Jira/Confluence Cloud

Still need help?

The Atlassian Community is here for you.

Ask the community

Summary

This document outlines guidelines for identifying which attachments can be safely removed before migrating all data, including attachments, using the Cloud Native Copy Data Features Copy Jira Data, Copy Confluence Data, and Copy Production Data

Overview

Reducing attachment size prior to migrating Jira or Confluence from one Atlassian Cloud to another can be highly beneficial for several reasons:

  • Faster and Smoother Migration: Migrating less data results in a quicker process that is less susceptible to errors or interruptions. Large attachments can significantly hinder migration speed and increase the risk of downtime.

  • Improved Cloud Performance: A streamlined dataset in the cloud enhances performance and creates a simpler environment for teams to navigate, facilitating the discovery of relevant information and minimizing clutter.

  • Easier Cleanup and Optimization: The migration process presents an opportunity to eliminate old, unnecessary, or redundant attachments, thereby enhancing data quality and compliance.

In summary, reducing attachment size before migration results in a faster, less risky, and more cost-effective transition between Atlassian cloud sites, while also improving the usability and performance of your cloud environment.

Atlassian Support can generate a comprehensive array of reports from the Jira and Confluence cloud Databases, concentrating on existing attachments. Administrators can utilize these reports to enable informed assessments.

How to get the Report

To get these reports, reach out to Atlassian Support by creating a Support Ticket.

How to Leverage the Report

Jira

  1. List of 100 Large Attachments from all Jira Issues

    Customers can request Atlassian Support to obtain a list of the 100 largest Jira attachments. The support team will assess this request and provide a CSV file formatted as follows:

    issue-id,issue-key,attachment-id,attachment-name,attachment-type,attachment-size,attachment-added
    Example file jira-large-attachments.csv

  2. Jira Issues with the Most Number of Attachments

    This list serves as a valuable resource for identifying attachments that may be deleted by analyzing the Jira issues with the highest number of attachments. The support team can assess this request and provide a CSV file formatted as follows:

    issue-id,issue-key,number-of-attachments,total-attachment-size
    Example file jira-issues-with-most-attachments.csv

    Once the customer receives the list, they can submit the issue IDs for which they wish to obtain the attachment IDs to delete. The CSV file will adhere to the format outlined below:

    issue-id,issue-key,attachment-id
  3. Jira issues that are not updated in a specified time period

    This list can assist customers in identifying and reviewing issues that have not been updated for an extended period (between two dates), as retaining their attachments in Jira Cloud contributes to increased data volume. The support team can evaluate this request and provide a CSV file in the format outlined below:

    issue-id,issue-key,total-attachment-size,last-updated
    Example file jira-issues-updated-in-X-with-attachments.csv

    Once the list is obtained, the customer can submit the issue IDs for which they wish to receive the corresponding attachment IDs for deletion. The CSV file will adhere to the format outlined below:

    issue-id,issue-key,attachment-id
  4. Jira Issues in which Attachments are Added via Comments

    Reviewing issues that include large attachments added via comments can be advantageous in assessing whether those attachments should be removed. The support team can evaluate these requests and furnish a CSV file formatted as follows:

    attachment-id,attachment-name,attachment-type,issue-id,issue-key,attachment-size
    Example jira-issues-added-via-comment.csv

Confluence

  1. Find duplicated files bigger than 10MB

    This report aims to assist the customer in identifying all duplicate attachments that exceed 10MB in size. The data will be presented in a CSV file formatted as follows:

    content-id,title,longval,page-link 

    Example confluence-duplicated-files-bigger-than-10MB.csv

  2. List all attachments for all unpublished drafts
    In this report, customer will have the opportunity to review all attachments uploaded to any unpublished draft pages. They can then determine whether to delete these pages along with their attachments. The CSV file will contain data formatted as follows:

    attachment-size,title,page-id,content-id

    Example confluence-attachments-on-unplublished-drafts.csv

  3. Checking the top 30 largest attachments of the instance

    In this report, customer can examine a list of the 30 largest attachments in Confluence Cloud. This offers an additional opportunity to assess the attachments prior to deciding whether to delete them. The CSV file contains data in the following format:

    content-id,attachment-name,size-in-kb

    Example: confluence-top-30-attachments.csv

  4. Top 100 archived pages containing the biggest amount of attachment data

    Archived pages containing attachments can substantially impact storage consumption and elevate data volume during migration. This report examines 100 archived pages with attachments and offers insights into their usage. The accompanying CSV file presents data formatted as follows:

    title,page-size-in-kb,page-url

    Example confluence-top-100-archived-pages-with-attachments.csv

How to use Rest API to delete attachments

Two REST APIs are available for the bulk deletion of attachments. These APIs can be utilized programmatically within any script or through Postman, where attachment IDs can be imported from a CSV file.

REST APIs for deleting attachments by attachment IDs.

  1. Jira: rest/api/3/attachment/{id}

  2. Confluence: api/v2/attachments/{id}





Last modified on Jul 28, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.