Too Many Files in the Temp Directory - Change the Backup Directory for a Manual Backup

Still need help?

The Atlassian Community is here for you.

Ask the community

Atlassian recommends disabling the XML backup both for performance and reliability. Setting up a test server and the Production Backup Strategy is better done with an SQL dump. Upgrading Confluence is better done without the XML backup.

The one operation for which an XML backup is required is database migration. For this we recommend a commercial database migration tool. Vote for Too Many Files in the Temp Directory - Change the Backup Directory for a Manual Backup to add a more robust strategy for large implementation migrations. Atlassian does not support migrating to a new database.

Symptoms

  • The daily backup has been changed to a different folder for daily backups, but the manual backup is still going to the home directory.
  • The size of the <confluence-home>/temp directory is large

Cause

The location for daily backups folder is different from the folder where a manual backup is generated. The change made to the daily-backup folder does not apply to the folder where manual backups are created.

Resolution

  1. Edit the following line in the <confluence-home>/confluence.cfg.xml file:

    <property name="webwork.multipart.saveDir">${confluenceHome}/temp</property>
    

    Despite the name, this property is used for all temporary files in Confluence, not just multipart file uploads.

  2. Additionally, you can configure the periodic deletion of temporary files by Confluence. On the Scheduled Jobs administration page, you can adjust the schedule for the "Clean Temporary Directory" job. By default, it runs at 4am server time each day.

    The job deletes files which are themselves older than 24 hours, so by default, files can remain in the temporary directory for just shy of 48 hours. For downloadable files generated and managed by Confluence, this matches with the "download gatekeeper" policy, which allows access to generated files for 24 hours after their creation.

Last modified on Feb 26, 2016

Was this helpful?

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