Via SQL, I am trying to extract path and filename of attachments on our Jira Software Server.
After reading this article: https://confluence.atlassian.com/jirakb/locate-jira-server-file-attachments-in-the-filesystem-859487788.html I do have some questions:
#1
The article writes that <bucket> number depends on file ID number, but the examples provided use issue number:
CEILING((ji.issuenum/10000))*10000
Also, this does not count as described. I guess it should be something like:
CEILING((fa.id/10000)-1)*10000
#2
Some files on the server seem to have another filename than the one provided in fa.filename (which is also what is seen in the UI). Specifically, like <fa.id-<fa.filename>. Any idea how to know when one filename or another is used?
Best Regards
Bo
Gosh.. I think I figured it out. We have attachments stored in three different ways:
Ancient
<JIRA_HOME>/data/attachments/<PROJECT>/<ISSUE_KEY>/<ID>_<filename>
Example:
<path>/data/attachments/DL/DL-1008/13195_a.png
Historic ('old format' in referenced article)
<JIRA_HOME>/data/attachments/<PROJECT>/<ISSUE_KEY>/<ID>
Example:
<path>/data/attachments/DL/DL-1427/13307
Modern
<JIRA_HOME>/data/attachments/<PROJECT>/<BUCKET>/<ISSUE_KEY>/<ID>
Examples:
<path>/data/attachments/DL/10000/DL-5236/48246
<path>/data/attachments/DL/20000/DL-10005/74434
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.