Guidelines for Determining Which Attachments Can Be Deleted from Jira/Confluence Cloud
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
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
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
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
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
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
- 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
Confluence
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
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
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
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.
Confluence: api/v2/attachments/{id}