Error after modifying the xml backup file Edited

Suhas Patil Community Champion Dec 19, 2017

Hey guys,

I am getting error after modifying xml backup file.

"The file '/data/jira/import/' is not a valid JIRA backup."

 I unzipped xml backup file, did some operations on entities.xml (followed Atlassian KB, ), then zipped it again (#zip -r backup/).. however while trying to import using new zip file, jira gives above error. 
I did notice that something is wrong with zip file format itself (zipinfo), looks like i am using wrong command to zip it.. what is the right zip command to create backup zip?

zipinfo for new created gives this result..

[ec2-user@ip-xx-xx-x-xxx import]$ zipinfo
Zip file size: 144316013 bytes, number of entries: 3
drwx------  2.1 unx        0 bx stor 17-Dec-18 20:39 backup/
-rw-r--r--  2.1 unx 1242593916 bX defN 17-Dec-18 20:35 backup_jira_se_20171218_3_2/entities.xml
-rwxr-xr-x  2.1 unx 734370602 bX defN 17-Dec-18 10:32 backup_jira_se_20171218_3_2/activeobjects.xml
3 files, 1976964518 bytes uncompressed, 144315421 bytes compressed:  92.7%


However the original backup file created by jira shows different info on zipinfo command,


[ec2-user@ip-xx-xx-x-xxx import]$ zipinfo
Zip file size: 145216348 bytes, number of entries: 2
-rw----     2.0 fat 1211976302 b- defN 17-Dec-13 09:54 entities.xml
-rw----     2.0 fat 734204951 b- defN 17-Dec-13 09:55 activeobjects.xml
2 files, 1946181253 bytes uncompressed, 145216076 bytes compressed:  92.5%



1 answer

1 accepted

1 vote
Answer accepted
Suhas Patil Community Champion Dec 19, 2017

Found the problem. I was compressing entire folder containing 2 files instead of two files in one which was creating folder path as a third element making it a bad zip file.

Used some online tool for zip which creates it in proper format with fat and binary. 

Still couldn't figure what is the best was to compress on Mac.

Can you link to the online tool you used? We are running into this issue in my environment.

Nevermind, I solved this. For anyone who comes along and needs it:

cd folder; zip -r ../ *

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 26, 2019 in Jira Software

How to prevent the propagation of unused project schemes, workflows & screens in Jira software

Atlassian ranks project attributes as the third most important factor impacting performance in the category of data. It’s not surprising, since project attributes are precisely the rules used to ma...

656 views 0 7
Read article

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