Document toolboxDocument toolbox

How to free up disk space for Confluence

Introduction

If your Confluence instance is running out of disk space, then this article may be useful for you.

There are a few methods to have more disk space in Confluence.

  1. Upgrade to have more disk space

  2. Housekeep unnecessary files from the Confluence backend

  3. Update the retention rules to delete unwanted data

  4. Remove very large attachments from Confluence

  5. Archive and remove unused Confluence spaces

  6. Implement a policy to manage the growth of attachments in Confluence

 

6 ways to solve disk space issues in Confluence Banner.png

Ways to get more disk space

1) Upgrade to have more disk space

This is the easiest way since disk storage is relatively cheap compared to other resources.
However, there are also implications to search performance and longer maintenance downtime.

 

2) Housekeep unnecessary files from the Confluence backend

There are a few directories in the Confluence which typically consumes a lot of disk spaces. It is possible to free up a significant amount of disk space if this is not done before.

Location

Directory Name

Purpose

Remarks

Location

Directory Name

Purpose

Remarks

Confluence Home Directory

backups

Confluence will place its daily backup archives in this directory.
Backup files in this directory take the following form daily-backup-YYYY_MM_DD.zip

It is recommended to keep at least 7 days of backups

export

Stores the support zip generated by the Troubleshooting and support tools for Confluence

You can delete those support zips that are no longer required

logs

Confluence's application logs are stored in this directory

 

temp

Used to store temporary files generated by Confluence

You can delete all the files in this folder when Confluence is offline

recovery

Confluence creates an upgrade recovery file before and after an upgrade which can be used to roll back when upgrade fails

You can keep the recovery file for the latest upgrade

restore

Used to store files for restoring Confluence site or space

Sometimes admins will forget to housekeep the files after restoring the site/space

Confluence Install Directory

logs

Stores the Tomcat and Confluence access logs

You can delete those logs which are no longer required

temp

Used by Confluence to write tempory files or lockfiles

You can delete all the files in this folder when Confluence is offline

You can schedule for a maintenance downtime to stop the Confluence service before deleting the files within the directory. 

  • Do not delete files without stopping the Confluence service as it may cause corruption

  • Do not delete the directory as Confluence needs it to store new files when it is started

 

3) Update the retention rules to purge deleted items automatically 

Confluence Data Center has a useful feature to purge deleted items from the trash automatically. This is a time saver as most space admins tend to miss out this important administrative task.

Another feature for space hungry sites is to automatically delete historical versions of pages/attachments. This feature is a bit risky if some old versions contains important data. 
You should inform all users upfront if there is plan to housekeep the historical versions.

If you don't want to archive the attachments, then it is better to rename to a new filename rather than uploading a new version.

 

retention-rules-global-all.png

You can find out more about Data Retention Rules from Confluence User Guide.

4) Remove very large attachments from Confluence

With Attachment Checker for Confluence, the Quota Summary report allows Confluence administrators to check the disk space utilisation of attachments space by space.

It is then possible to zoom into the space to check if there are some ultra big files being uploaded. Space admins can delete those very big files after checking the content.

 

5) Archive and remove unused Confluence spaces

You may want to check with your organization's retention policy. ISO 27001 compliance framework requires organization to retain data logs for at least 3 years

Since Confluence is a matured product, there may be Confluence spaces over 20 years old. 
The content inside may not longer by relevant. An option is to delete those spaces from Confluence.

6) Implement a policy to manage the growth of attachments in Confluence

We know it is a tedious and time-consuming activity to curate and delete files from Confluence.
Also when content are removed from Confluence, they can not longer be searchable on Confluence.
By reducing misuse and educating the users, it is possible to avoid unnecessary growth in the disk space usage.

 

Attachment Checker provides the mechanism to enforce the policy through several features

Guiding Principle

Mechanism in Attachment Checker

Scenarios that you can use it

Guiding Principle

Mechanism in Attachment Checker

Scenarios that you can use it

Only allowed file types for work purpose can be uploaded to Confluence

Restrict attachments by file type

  • The allow/deny list can be updated when undesired file type using a lot of disk space has been observed 

  • Inefficient file types like BMP can be blocked

Very large file uploads should be limited to authorised users who knows what they are doing and willing to housekeep the files

Limit the file size for different user groups

  • There can be a confluence-power-users group which can be permitted to upload larger files

  • Content creators who uploading video content can be a member of the group

Very large file uploads should be restricted to a few Confluence spaces so that it can be easily managed

Manage attachment quota per space

  • There can be a few Confluence spaces with very high quota

    • space for downloading installer programs

    • space for hosting videos for corporate events

It is more productive to housekeep a few ultra large attachments than to review each and every attachments

Track large attachments

  • Use Large Attachment Tracker to discover the users who are uploading large attachments

 

Closing Remarks

We have shared 6 ways to reduce disk space usage in Confluence Data Center.

We understand it is challenging to manage an ultra large Confluence instance with over thousands of users and hundred of spaces.
It is not sustainable to keep on increasing the disk space for Confluence when thousands of users are continuously uploading attachments to collaborate their work.
Hence it is important to plan ahead by putting in place polices for large Confluence instances.