How to copy attachments from jira 6 to 7

Sue Brazelton October 17, 2016

This past weekend we migrated our production environment from JIRA 6 to JIRA 7 however, the attachments/images were not migrated over.  We are missing about 2 months worth of attachments in our JIRA 7 environment.  How can we migrate over a subset of attachments? 

We have already tried copying a folder containing the missing attachments, re-indexing, and restarting the JIRA services.  This did not work.

4 answers

0 votes
Sue Brazelton October 18, 2016

Here's hopefully a better description of our situation...

The team performing the upgrade setup a POC environment where everything was migrated over including attachments back in August and we’ve been using it for validation testing. This past weekend when we were ready to go live, they migrated over just the database and not those things (like attachments) that are stored on the application server hence we are now missing about 2 months’ worth of attachments.

Late yesterday, working with our DBA, we discovered that if we copy over the missing attachments to the new JIRA 7 server and then change the database field (for example thumbnailable) from 0 to 1, the images are then seen as we want.

So that’s the direction we took.  Please let me know if you know of issues this could cause us.

Thank you so much,

Sue

0 votes
Sue Brazelton October 18, 2016

Thanks for responding.  The team performing the upgrade setup a POC environment where everything was migrated over including attachments back in August and we’ve been using it for validation testing. This past weekend when we were ready to go live, they migrated over just the database and not those things (like attachments) that are stored on the application server hence we are now missing about 2 months’ worth of attachments.

Late yesterday, working with our DBA, we discovered that if we copy over the missing attachments to the new JIRA 7 server and then change the database field (for example thumbnailable) from 0 to 1, the images are then seen as we want.

So that’s the direction we took.  Please let me know if you know of issues this could cause us.

Thank you so much,

Sue

0 votes
Steven F Behnke
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.
October 17, 2016

I'm confused as to how you could only have migrated a subset of the attachments in the first place. Can you provide screenshots of errors or provide errors from the application-log file?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2016

You'll need to recreate the contents of the "attachments" table for the missing records (as well as copy the physical files over into the attachments directory).  That's not really for the faint-hearted, I'd suggest writing a script that can re-attach the files over REST is a safer, easier option (if you can live with the loss of data on the date/time/author of attachment)

Suggest an answer

Log in or Sign up to answer