cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7734
Views
25
Helpful
14
Replies

BAT 8.5 import/export - edit tar file problem

jburk
Level 1
Level 1

I have exported my CTI Route Points (with dependencies) to a .tar using BAT, and downloaded to my PC. I used 7-zip to extract all of the files, including header.txt, made my changes to the ctiroutepoint.csv and saved the file. Then I added all of the files to a new .tar file and uploaded to CUCM import.

I have also tried simply adding the modified .csv to the actual .tar archive downloaded.

Either way, I get this error, when I go to import/export - import and select the file

Unmapped Exception bad  header in block 1 record 15, header magic is not 'ustar' or unix-style zeros, it  is '82848932737884', or (dec) 82, 84, 89, 32, 73, 78,  84

I have done this before with CM 6, 7 and even 8.0 I believe, but for some reason when I modify these .tars it seems to create an issue.

Is something changed in 8.5 or is anyone else seeing this issue?

14 Replies 14

jburk
Level 1
Level 1

I should also mention, there was only 1 CTI RP on the system export, I am trying to add a bunch, these are not existing

Did you find a resolution?

I'm running into the same problem after patching to CUCM 8.5.1.12900-7

I did not see it in CUCM 8.5.1.11900-21

From what I see on the web, this may be a Java problem in the GUI.

If I un-TAR the file, make no changes, then TAR it back up & Import, there are no errors.

If I change anything at all, I get these errors:

Validate Import - "Tar File does not have the header file" (yes, it has a valid header file)

Import File - "Unmapped Exception bad header in block 0 record 17, header magic is not 'ustar' or unix-style zeros, it is '78738479823268', or (dec) 78, 73, 84, 79, 82, 32, 68"

Randy

Hi guys

i have exactly the same problem with CUCM 8.6.2a.

Do you have a solution for this problem.

Regards Markus

Hi

Can you post up your original (unedited) tar, and the edited .tar you are trying to upload?

I guess 'header magic' refers to the magic number string of the tar file rather than the hearder file embedded in the csv. Would need to compare with a hex editor.

Have you guys tried simply removing/readding the same, unedited CSV file in the tar to verify whether it's definately the tar or the contents that is the problem?

I've done this process on 8.5 (not for CTI bits, but it's all the same in theory) lots this month without major problems.

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hi

The Files are uploaded.

Regards Markus

Aaron,

Are you using 7-zip or another program to unpack/rebuild the tar?

Hi

Yes I use 7-zip.

Hi,

I've exactly the same issue; did You solved it ?

If i try to validate the tar file ( made with 7zip ) i get:

Validate Configuration Items

Begin Time : 11/27/2012 12:09:57

Failure Details :

FileName Error Code Error Description

-----------------------------------------------------------------------------------------

Gateway-IMP.tar Tar File does not have the header file

Result Summary :

VALIDATE for 1 FILES could not be processed.

VALIDATE for 0 FILES passed.

VALIDATE for 0 FILES failed.

Hi,

    I have the same problem (CUCM 8.6.2.22900-9), could you solve it?

Thanks,

Javier.

I'll answer myself. Import/Export does not support special characters...

This isn't true.

You just need to pay attention to the character encoding of your csv files.

I guess (all) your files were encoded in ANSI.

You have to convert them to "UTF-8 without BOM".

You should be able to do this in every editor better than standard-notepad.

For reference: I used Notepad++

Regards.

Thank you. I had the same problem on CUCM 10.5.

We had a similar problem with 9.1.2.   The solution was usuing 7-zip on windows or tar from the CLI on OS X

orlandoguy82
Level 1
Level 1

Note that I use a Mac. Mac Excel is not the same as Excel on Windows. I've learned the hard way to do this on windows. The steps below are written from a Mac OS perspective. 

 

  1. Export Phones/user/other data into .txt files. 
  2. Rename the .txt to .csv before importing into excel (Tell Mac to keep in csv when asked)
  3. In a Windows VM (Mac does not have the same import wizard needed if the spreadsheet has many columns, using the regular wizard one cannot highlight all the columns and assign to format “text”, the last columns will be “general” format and number patterns may be put in Scientific notation or have other formatting. Once exported again to csv these values remain. Be careful. 
  4. In Windows Excel go to Data > From Text/CSV. Select the CSV and Import
  5. Excel connects to the data source and provides a preview window. 
  6. Make the File Origin "65001:Unicode (UTF-8)”, the Delimiter “Comma” and Data Type Detection “Do not detect data types"
  7. Click “Load"
  8. Go into “Queries and Connections” window and delete the connection.
  9. Click delete to the prompt.
  10. Close the “Queries and Connections” window
  11. Highlight the entire worksheet and change the format from “General” to “Text” from the Home tab.
  12. Copy the 2nd row that contains the real header to the first row and then delete the second row so there are the correct headers. 
  13. Do what needs to be done with the data. Make sure to keep everything formatted as Text
  14. File > Export > Change File Type > Save as Another File Type > Save as type “CSV UTF-8 (Comma Separated) and save. 
  15. If this is an Import (not Phones, etc) and needs to be placed into a TAR file make sure that the filename matched exactly the name in the header text file. 
  16. The Files listed in this header.txt must match the exact name of the csv files that will be packaged. 
  17. Highlight the header file, and csv’s it contains and right-click.
  18. Use 7-zip to “add to archive”
  19. Change Archive Format to “tar”
  20. Change the name of the file to what you need.