How To Manually Change Attachment Data Storage Location
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Symptoms
Preexisting attachments, in either the database or file system, have been set to use the opposite of what has been set for file storage. Changing the setting will delete the attachments table and effectively un-reference all attachments.
Resolution
Atlassian Support Offerings
The following SQL query is outside the scope of Atlassian Support Offerings and is provided for general guidance only.
The resolution involves making changes directly to the database, please be sure to create a backup of your database before enacting any of the following steps.
Run the following SQL query:
1
SELECT bandanavalue FROM bandana WHERE bandanakey='atlassian.confluence.settings';
ℹ️ The case may need to be altered for the above statement to work
Copy the returned bandanvalue entry into an editor of your choosing
Edit the '<attachmentDataStore>' value to one of the following
For file system storage use <attachmentDataStore>file.system.based.attachments.storage</attachmentDataStore>
For database storage use <attachmentDataStore>database.based.attachments.storage</attachmentDataStore>
Run the following SQL query:
1
UPDATE bandana SET bandanavalue=<the newly edited value from step 3> WHERE bandanakey='atlassian.confluence.settings';
ℹ️The case may need to be altered for the above statement to work
Was this helpful?