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/backup.zip' is not a valid JIRA backup."

 I unzipped xml backup file, did some operations on entities.xml (followed Atlassian KB, https://confluence.atlassian.com/jirakb/project-import-fails-due-to-too-many-errors-747836945.html ), then zipped it again (#zip -r backup.zip 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 backup.zip created gives this result..


[ec2-user@ip-xx-xx-x-xxx import]$ zipinfo backup.zip
Archive:  backup.zip
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 backup_jira_se_stage_for_migration_13122017_backup.zip
Archive:  backup_jira_se_stage_for_migration_13122017_backup.zip
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

0 vote
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.

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

30 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot