How To Manually Change Attachment Data Storage Location

Still need help?

The Atlassian Community is here for you.

Ask the community

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.

  1. Run the following SQL query:

    SELECT bandanavalue FROM bandana WHERE bandanakey='atlassian.confluence.settings';
    

    (info) The case may need to be altered for the above statement to work

  2. Copy the returned bandanvalue entry into an editor of your choosing
  3. 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>
  4. Run the following SQL query:

    UPDATE bandana SET bandanavalue=<the newly edited value from step 3> WHERE bandanakey='atlassian.confluence.settings';

    (info)The case may need to be altered for the above statement to work

Last modified on Feb 26, 2016

Was this helpful?

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