XML export of a Confluence Space fails with "Error creating temp file in folder"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When performing an XML Export of a Confluence Space, the export may fail with the following error in the UI:
There was an error in the export. Please check your log files.
:Error creating temp file in folder:
<confluence-home>/temp/xmlexport-<date>/attachments/<pageid>/<attachmentid>
See an example of the error below:
Environment
Confluence Server or Data Center running on Linux.
Confluence Home folder mounted on an ext3 or ext4 file system.
Diagnosis
Any export trial of the target Space fails with the same error message in the UI.
The following entries can be found in the atlassian-confluence.log.
Adding DEBUG to the following classes don't unveil anything different that could be causing an issue.
com.atlassian.confluence.importexport
com.atlassian.confluence.pages.persistence.dao
com.atlassian.hibernate.extras.XMLDatabinder
Confluence Home directory is part of an ext3
File System, or ext4
without dir_index
and dir_nlink
features enabled.
blkid
command may be helpful to identify the file system type.- tune2fs command may be helpful to identify features enabled on a file system.
If you are reaching the problem described in this KB, there won't be any other meaningful message in the application logs because of CONFSERVER-59957 - Getting issue details... STATUS
Cause
Some file system types has a limitation on the number of subdirectories as detailed in the below table.
File system | ext3 | ext4 | GFS | GFS2 | XFS |
---|---|---|---|---|---|
Maximum subdirectories | 32,000 | 65,000/unlimited* | unlimited | unlimited | unlimited |
*ext4 is unlimited when dir_index and dir_nlink features are enabled. |
When exporting a Space, Confluence will copy the attachments from the <confluence-home>/attachments/ver003/
directory structure to <confluence-home>/temp/xmlexport-<date>/attachments/
, which is a temporary directory used to store the exported content before compressing in a zip
file.
Depending on the number of pages with at least one attachment, Confluence may surpass the maximum number of subdirectories in <confluence-home>/temp/xmlexport-<date>/attachments/
.
For example, when <confluence-home>
is mounted with an ext3 file system, this limitation is surpassed if the Space has more than 32,000 pages with an attachment each.
Solution
If <confluence-home>
is mounted on an ext3
File System, work with internal teams to migrate it to a File System with unlimited support for subdirectories.
If using ext4
, make sure dir_index
and dir_nlink
features are enabled.
If still facing issues while exporting the Space, please contact the support team.
See Also
Hierarchical File System Attachment Storage
Red Hat Enterprise Linux technology capabilities and limits
ext4 - Unlimited number of subdirectories