Migrating from local JIRA Server to JIRA Cloud - how to upload attachments

Ed Latimer-Sayer July 24, 2017

Any help gratefully received.

I'm in the process of migrating our local JIRA server instance up to the cloud. I've successfully uploaded a backup file containing just the activeobjects.xml and entities.xml files, so that's a good start... but how to I go about getting the content of the jira-home/data directory up to the cloud?

I've tried to edit the export zip file to include them on import, but I just can't seem to get that to work. I always get an error message that the file doesn't contain entities.xml, even tho it's clearly there. I've tried packaging it back up using windows, 7zip as I'm on a mac, but still no luck.

I can't see an option to add the attachments via any other means, can anyone help?

6 answers

3 votes
K_ Yamamoto
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 4, 2018

If you see the error "The import archive doesn't contain entities.xml file", perform the command like unzip -l jira-export.zip and make sure your zip file keeps the expected archive structure as follows:

├── activeobjects.xml
├── entities.xml
├── data
│ ├── attachments
│ └── avatars
└── logos
Aron Bury July 29, 2018

Hi @K_ Yamamoto,

I've just completed a backup from one cloud instance to import into another and it's not working at all. See below images

I've followed the instructions at https://confluence.atlassian.com/adminjiracloud/importing-issues-776636788.html to the letter. I've:

  • Double and triple checked the folder structure. It came without a logos file/folder, but I've tried adding one and doing that too..
  • Made sure to remove all hidden OSX files.
  • I've tried what @Andy Heinzer has suggested and use seperate folders. No matter what I try, I keep getting this error.

Nothing is working. The backup and import is both happening with on-demand cloud instances, so I wouldn't have thought versioning would be an issue.

Very keen to understand the issue so we can move forward.

 

Screen Shot 2018-07-29 at 6.41.20 pm.png

jira_failed_import.png

K_ Yamamoto
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2018

Hi @Aron Bury,

Glad to hear you made it import the data. Yes, Safari unzips the backup file without asking you. As you mentioned, downloading with Firefox or Chrome is the easiest workaround for this problem.

My best guess what caused the problem you faced is a way of compressing the data with Mac GUI. It's a bit tricky. As you can see below, to zip the backup file correctly, you have to:

  1. Select all the data in the target folder
  2. Compress the selected data from the menu

 

jira-export.png

 

Thanks!

2 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2017

There have been changes to how that Server to Cloud migration handles this attachment aspect.  In previous iterations, you could simply create a single zip file that contained all this data with their respective zip files and import just that.  But now you will actually need 4 completely separate zip files:

- attachments.zip
- avatars.zip
- logos.zip
- backup.zip

Backup.zip will only contain:
- entities.xml
- activeobjects.xml

  1. First you run the import with the - backup.zip (which it sounds like you have already done)
  2. then you run the import again with the - attachments.zip
  3. then you run the import again with the - avatars.zip
  4. then you run the import again with the - logos.zip


So you actually have to perform 4 different imports because you can only upload one file at a time.  This method should allow you to complete this Server to Cloud migration with the attachments included.

Ed Latimer-Sayer August 2, 2017

Hi Andrew, thank you for your reply.

I've tried to follow your instructions but I seem to be getting the same error, as shown below:

Import error

There was an error importing file attachments.zip: Validation failed. Following issues were reported:The import archive doesn't contain entities.xml file.

 So this is after I have successfully imported the main backup.zip file. I'm then running the 'Restore System' option again but just providing the attachements folder in a zip file. I've tried with it as the root of the zip file, as well as unpacked... but I get the same error.

Is there a consistent way of creating the attachments.zip file successfully? I'm using a Mac if that might be causing a problem.

Many thanks, 

Ed

Karl M Kovaciny September 5, 2019

It's not quite as hard as this answer makes it sound any more. On the migration I did today it was just two files -- "data" (backup), and "media" (all others). 

1 vote
Karl M Kovaciny September 5, 2019

One simple thing that can cause this error:

If you upload your "media" file using the button for "data", you get this error (after about 40 minutes of processing). Anyway, the "media" file is not supposed to have an entities.xml in it, so just upload it again with the correct button.

0 votes
sergio October 5, 2018

Hi @K_ Yamamoto

I would suggest you to update the official online documentation at page: 

https://confluence.atlassian.com/jirakb/migrating-from-jira-server-to-jira-cloud-779160826.html

because this is a very important piece of information to successfully complete a migration.

Thanks!

K_ Yamamoto
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2018

I updated the page. Thanks for the helpful feedback!

sergio October 9, 2018

:+1:

0 votes
Daniel Chehrzad August 1, 2018

Hello,

I'm experiencing the same issue importing from local jira to the cloud. 

I've exported using our local Jira UI, then downloaded the backup from our linux server using WinSCP, and then zipped them using both 7zip and winrar, so far the same result. My zipped file is as it instructed : two xml files and then data folder which contains attachments.

After reading this post, now I doubt if I should import all of them using one zip file or import them separately? 

 

I hope there was a clear step by step instruction for this. Following the article and failing with this is strange.

0 votes
Aron Bury July 29, 2018

This is why I like posting a public question, I usually solve it a minute or two after posting 😂

I have no idea why, but I just downloaded the export using a different browser (Firefox instead of Safari) and it worked like a charm. 👍

 

I noticed that safari automatically unzipped it whilst Firefox asked, so it might have been doing something odd. Anyway, hope this helps someone!

Suggest an answer

Log in or Sign up to answer