Overview

Over time the number of attachment versions might grow infinitely. Space Admin provides a service to delete selected attachment versions on a regular basis by configuring a cron expression for each service.

The attachment cleanup service can be reached via the Confluence administration → Space Admin.

On this page all created services will be listed in combination with the following information:

  • Name
  • Description
  • Creator
  • Date of creation
  • cron expression
  • Current status (enabled/ disabled)



Configuring a new cleanup service

Upon clicking on "Add attachment cleanup service" in the upper right-hand corner a new cleanup service can be configured.


The following options can be configured:

OptionDescription
Name

(warning) Required option.

Give your attachment service a meaningful name.

DescriptionDescribe what your attachment service is doing.
Cron expression

(warning) Required option.

Enter a valid cron expression. Some basic examples can be found further down on this page.

Spaces, Pages, Attachments

Select, which spaces, pages or attachments should be searched for cleaning the attachment versions.

(warning) The items selected in Spaces, Pages and Attachments will be OR linked. So no matter which attachment is selected, if a space is selected, all attachment versions in this space will be cleaned up. The specified attachment will be cleaned additionally.

Cleanup modeSelect whether you want to keep a specific amount of attachment versions, or specify a minimum number of days a version must be present in the system before it will be deleted. 


Handy cron expressions 

The following cron expressions might be useful when setting up a new attachment service:

cron expressionExplanation
0 0 1 1 1/1 ? *The service will be executed on every first day of each month at 01:00 am.
0 0 1 ? * 2 *The service will be executed each Monday every week at 01:00 am.
0 0 1 1/14 * ? *

The service will be executed every 14 days in a month, starting on the first day of each month at 01:00 am.

Note: This job will always be executed on the 1st, the 14th and depending on the days in the month on the 29th and then again on the 1st of the next month.

0 0 1/12 ? * * *This service will be executed every 12 hours on each day starting at 01:00 am.


Previewing a cleanup service

It is also possible to preview a cleanup. By clicking on the "Preview" button next to the cleanup service, a preview of versions to be deleted will be displayed.


On the opening page the versions to be deleted will be listed.

(warning) This page always displays a maximum of 100 random results from the cleanup job. The exact number of versions can be seen in the top alert box.



On this page

  • No labels