Error after modifying the xml backup file

Suhas P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 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

1 vote
Answer accepted
Suhas P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 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.

Matt_Petters October 11, 2018

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

Matt_Petters October 11, 2018

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

cd folder; zip -r ../my_zipped_folder.zip *
Like Jeff Foarde likes this

Suggest an answer

Log in or Sign up to answer