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

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

Accepted Answer
1 vote

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

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 Jul 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

 

 

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 Jul 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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

47 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you