This archive doesn't contains any valid attachments (jira 6.4.7 to jira CLOUD)

Danny Mensen July 26, 2015

Hello,

i've doing a migration from JIRA 4.1 to JIRA 4.4.5 to 6.4.7 and finaly to JIRA cloud.

after the export from 6.4.7 the attachments won't import. getting the following error:

 

  • This archive doesn't contains any valid attachments

attachements.zip contains a dir attachments with the projects.

the server is running on linux ubuntu when copying to my local windows 7 machine the zip errors because of long file names.

4 answers

1 accepted

1 vote
Answer accepted
Danny Mensen July 29, 2015

SOLUTION FOUND!

 

Hi Paulo,

 

I've already created my own solution. By making a cloud backup en exploring the backup file i found the filenames only have a id number from JIRA not a complete filename with file extention.

After making a python script thas renames all the file name from a complete name to a JIRA file id i can now import the attachments

 

part of my python script that renames all attachments:

is searches the attachment directory for sub directories when a file is found , the first char until "_" wil be the file name (JIRA file id)

 

def checkFileNames():
        found = 0
        reNamed = 0
        errors = 0

        print "$$$$$$$$$$$$$$ Starting to rename files $$$$$$$$$$$$$"
        for dirName,subdirList,fileList in os.walk(rootDir):
                for fname in fileList:
                        found = found+1
                        if "_" in fname:
                                fileId = (fname[0:fname.find('_')])
                                print fileId
                                print dirName +" "+fname+" "+fileId+" "+str(subdirList)
                                os.rename (dirName+'/'+fname, dirName+'/'+fileId)
                                reNamed = reNamed+1
                        else:
                             	print "Error "+fname+" not contain _ or already done"
                                errors = errors+1
        print "\n Renaming DONE \n found "+str(found)+" files Renamed:"+str(reNamed)+" Errors:"+str(errors)

 

so the new file tree looks like:

Attachments.zip

                     |-- Attachments

                                          |-- AAI

                                                   |-- (empty)

                                          |-- AANVRAAG

                                                   |-- AANVRAAG-1

                                                                   |-- 28193_Delivery Note-140010129VL-20141210-1131.pdf

                                                   |-- AANVRAAG-2

                                                                   |-- (empty)

                                                   |-- AANVRAAG-3

                                                                   |-- 28189_48822_48822___834174.pdf

                                                   |-- AANVRAAG-4

                                                                   |-- 28190_Quotation-140010209AN-1-20141016-1652.pdf

                                                                   |-- 28191_CVA goedkeuring JetBrains PhpStorm + Adobe Photoshop Ids xxxxxxxx.pdf

                                                                   |-- 28268_Delivery Note-140010597VL-20141217-0853.pdf

                                                                   |-- 28269_Levering PHPStorm.msg

                                                                   |-- 28297_LicenseCertificate-R187901.pdf

 

 

Hope atlassian wil document this as a important solution to the import errors people have when migrating and wil change this as option in the cloud import tool.

 

Danny

Vik
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2016

The if block in the script needs to be modified

if "_" in fname: 

needs to be changed to 

if "_" in fname and "thumb" not in fname:

 

After making this change, if the thumbnails are still not visible; please contact Atlassian Support.

 

Vik

0 votes
Paulo Junior
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2015

Hi Danny,

 

If you are still in trouble, just contact support. We can try running a rsync with your attachments and that should solve the problem.

 

https://support.atlassian.com

0 votes
Danny Mensen July 27, 2015

Hi,

 

Yes i'm sure is used the following structure

today i've tried again also i've made a small attachments.zip with the following:

(xxxxxxxx = name)

 

Two projectsnames AAI and AANVRAAG back-uped from the JIRA server

the following still give a error when uploading 

 

Attachments.zip

                     |-- Attachments

                                          |-- AAI

                                                   |-- (empty)

                                          |-- AANVRAAG

                                                   |-- AANVRAAG-1

                                                                   |-- 28193_Delivery Note-140010129VL-20141210-1131.pdf

                                                   |-- AANVRAAG-2

                                                                   |-- (empty)

                                                   |-- AANVRAAG-3

                                                                   |-- 28189_48822_48822___834174.pdf

                                                   |-- AANVRAAG-4

                                                                   |-- 28190_Quotation-140010209AN-1-20141016-1652.pdf

                                                                   |-- 28191_CVA goedkeuring JetBrains PhpStorm + Adobe Photoshop                                                                         Ids xxxxxxxx.pdf

                                                                   |-- 28268_Delivery Note-140010597VL-20141217-0853.pdf

                                                                   |-- 28269_Levering PHPStorm.msg

                                                                   |-- 28297_LicenseCertificate-R187901.pdf

 

Whats wrong with these files and directory?

please help we have 500+ users to migrate and need a solution otherwise we must look for another program.

 

Danny

0 votes
Paulo Junior
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 27, 2015

Hi Danny,

Could you confirm that the attachments.zip file structure is the following:

 

attachments.zip

                     |-- Attachments

                                           |-- Projects

 

In case you are sure everything is fine, then I would suggest you to open a support ticket under support.atlassian.net

 

Cheers,

Paulo

 

 

Suggest an answer

Log in or Sign up to answer