How To Manually Change Attachment Data Storage Location
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:
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:
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