Restored JIRA - Attachments in correct location but not working

Shannon Davis April 16, 2015

Hello there,

 

We restored a JIRA backup XML to a new server, and moved over the attachments.  As far as we can tell, the path is the same as it was before, and we have checked the path in the configuration.

We can see files (with numeric names) in the file system, with file sizes that match the attachments. New attachments work fine - creating both a file, and opening. Older attachments appear in the JIRA ticket, as well as in the file system, but if you click on them from the JIRA ticket, there is an error.  I am thinking that there is a linkage between the file name and the numeric ID that has been lost.  Does anyone have any idea of what we'd need to do to fix this?

 

Updated:

It appears the IDs stored in the entities.xml for the attachments do not match what came in the zipped folders.

    <FileAttachment id="18800" issue="15009" mimetype="image/png" filename="jira-capture-screenshot-20150126-173015-420.png" created="2015-01-26 17:31:58.0" filesize="152456" author="c_mdalto"/>

 

See how it says "18800".  Well, the file in our system has a different numeric ID.  If we change it to 18800 (the file), then the attachment works.

 

The mystery is how all the IDs changed.  Presumably (AFAIK), they took the attachments and the export on the same day.

6 answers

1 accepted

1 vote
Answer accepted
Shannon Davis July 13, 2015

The consulting company that sent us our data took the ticket export from one system, and the attachments from another. 

This was because they took the attachments from the original repository, and had made a copy of that JIRA server, moved it elsewhere, and removed all the items they did not wish to share with us (other companies' data). 

In order for the migration to work, both the attachments and the XML must come from the same server, even if the two were an exact copy, the attachments must get new index numbers when imported.

0 votes
Pedro Cora
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2015
0 votes
Shannon Davis April 20, 2015

Further validated the IDs are wrong by importing the project and putting these files in the import directory. It still doesnt' see them although they are there. Unfortunately the consulting company will not provide anything new to us and refuses to answer my questions about the mismatched IDs.

0 votes
Shannon Davis April 17, 2015

I did inform them that the IDs don't match, possibly because they took the attachments from their production server, while the back-up came from a copy they made of their server (so they could cleanse it of all but our projects). They are looking into it. I also taught them how to check the data before sending it back. Fingers crossed. My only question is now - when does JIRA relabel all the attachments, because in theory they did a backup/restore/copy the same way we did, and so the attachment ids shouldn't have changed, unless there is something I don't understand about the way Jira works (and that's why I'm here, I suppose).

0 votes
Timothy
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.
April 16, 2015

Have you tried to ask them for a new backup and check if the IDs match up?

0 votes
Shannon Davis April 16, 2015

I should note that we are receiving the XML export (activeobjects.xml and entities.xml) as well as the zipped attachment directories from a consulting company that was previously hosting our JIRA for us. So I do not know if something happened on their end, but it may help if I could give them some direction on troubleshooting.

Suggest an answer

Log in or Sign up to answer