Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect attachment path

Matt Adams May 24, 2018

I've taken over the task of moving our on-premise Jira to the cloud.  In doing so, I've discovered one of the on-prem Jira projects had an incorrect attachments path.   As a result, there are no data files (attachments) to backup so there is nothing for me to migrate to the cloud for that project.

I still have access to the on-prem Jira.  I can see the attachments on the Jiras, so they must be somewhere.

How do I trigger dumping all those attachments to the new correct path?

Thanks,

Matt

1 answer

1 accepted

0 votes
Answer accepted
Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2018

Matt,

Can you share your System Information page with us?

Usually the attachment path is global per instance, not by project

Matt Adams May 24, 2018

The path before was wrong (it was a linux and mac path concatenated together).

Now it's fixed and is the system default. 

I'm sure if I used our server Jira instance to attach something it would show up in that directory.

My issues is how do I get all the 1000s of preexisting attachments to show up there?

Matt Adams May 24, 2018

What I was hoping for was a big button that said "Backup Attachments" but sadly that doesn't exist.

The instructions are to go to that directory and zip them up.  But there aren't any there since the original path was non-existent.

Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2018

Matt, can you do a search on the server to find the location?

the attachments are stored inside folders named after the issue key, so for example, if you have a BUG-33 issue on your Jira, a folder with the same name exists on disk with the attachments on it.

Matt Adams May 24, 2018

We've done a search but didn't find any. 

I was hoping that the path is now fixed there would be a way to trigger the jiras to put their attachments in the new path location.

The old path looked like this:
/var/atlassian/application-data/jira/data/attachments/Users/username/tools/jira_home/data/attachments

But that path/directory didn't/doesn't exist.

Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2018

Matt,

It depends on the version of Jira, but since v. 4 is not possible to change the attachment path, you need to create a symbolic link between the old wrong path and the new path.

https://confluence.atlassian.com/jirakb/how-to-change-the-attachments-directory-on-jira-237569020.html

If you have trouble finding the location of the files, you can try by looking at the directories on your server with the most size or files, or find a file by name.

Matt Adams May 24, 2018

Hi Gaston,

I want to thank you for all the help.  I really appreciate it.

Yes, when I found the the backup path it was in yellow (warning?).  I wish I would have took a screenshot.  Now it's set to the default and there isn't an option for putting a custom path in there.  My guess is we started pre-v.4 and that got carried along over the upgrades.

I did a 'find . -name <JIRA-NUMBER>' on the machine where all the other attachments are and it didn't come up with anything.   I did the same search on a different project and found the path/directory I expected to see.

I don't understand how I can see them in the jira and not find them on the disk.

Thanks,

Matt

Gaston Valente
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2018

Matt,

I’m sorry, i’m lost, may be @Nic Brough -Adaptavist- can help you.

i don’t know anybody with more jira experience.

Matt Adams May 25, 2018

Hi Gaston,

I'm not surprised at all that I managed to lose you.  :-)

I think we figured out what happened. 

1) Having an incorrect path meant JIRA used the default.  (perfect)

2) (And this is the part I didn't know until late yesterday) The project was named something else before (actually changed names twice).

The project started as ABC, moved to DEF, and now is XYZ.  The backup directory has data for ABC and DEF. 

My plan now is to sift through ABC and DEF and see where:

- they intersect

- they only exist in one

- they are missing altogether

It will take me a while but the plan is to build up a directory structure for attachments that can be used for importing XYZ. 

I'm starting with a single one to see if this is even possible with renaming and whatnot.

Thanks for all your help.  I really appreciate it.

Matt

Suggest an answer

Log in or Sign up to answer