cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1414
Views
4
Helpful
8
Replies

Import/export in BAT

tony loktu
Level 1
Level 1

Hi

We are migrating two CUCM clusters, version 9.1.2.13900-10 on both clusters. What we actually do is move the smaller of the clusters into the bigger one. Of course the configuration is not identical (different Device pools etc).

What we are hoping is that we can export the configuration from the smaller cluster, manipulate the configuration (renaming the device pools, CSS etc) and then import the configuration into the bigger cluster. So far we have not succeeded, there has always been some kind of error.

When importing, does the file header.txt need to be included? Is the import in any way dependant on this file (content, checksum, etc)?

We have tried a normal BAT without much success. I have been working with our Voicegateways. Getting the VGs over is fairly simple but when adding the slots and lines it fails.

I'm not looking forward to manually configure 3500 devices, even more users, lines etc....

An export format looks like this

Entity:GATEWAY                                                                                                                      
DOMAIN NAME DESCRIPTION PRODUCT PROTOCOL CISCO UNIFIED COMMUNICATIONS MANAGER GROUP XML                                                                                                                 

Entity:SLOTCONFIGURATION
GATEWAY NAME SLOT POSITION SLOT MODULE SUBUNIT POSITION VIC BEGINNING PORTNUMBER

 

Entity:ANALOG
GATEWAY NAME SLOT POSITION SUBUNIT POSITION PORT NUMBER ENDPOINT NAME DESCRIPTION PRODUCT TYPE PROTOCOL TYPE DEVICE POOL COMMON DEVICE CONFIGURATION PHONE BUTTON TEMPLATE COMMON PHONE PROFILE CALLING SEARCH SPACE MEDIA RESOURCE GROUP LIST LOCATION USER LOCALE NETWORK LOCALE DEVICE MOBILITY MODE OWNER USER ID USE TRUSTED RELAY POINT CALLING PARTY TRANSFORMATION CSS USE DEVICE POOL CALLING PARTY TRANSFORMATION CSS IGNORE PRESENTATION INDICATORS REMOTE DEVICE DEVICE PRESENCE GROUP DEVICE SECURITY PROFILE DEVICE SUBSCRIBE CSS UNATTENDED PORT MLPP DOMAIN MLPP INDICATION MLPP PREEMPTION INCOMING CALLINGPARTYNATIONALNUM DIGITSTOSTRIP INCOMING CALLINGPARTYINTERNATIONALNUMDIGITSTOSTRIP INCOMING CALLINGPARTYUNKNOWNNUM DIGITSTOSTRIP INCOMING CALLINGPARTYSUBSCRIBERNUM DIGITSTOSTRIP CALLINGPARTYTRANSFORMATIONCSS FOR NATIONALNUM CALLINGPARTYTRANSFORMATIONCSS FOR INTERNATIONALNUM CALLINGPARTYTRANSFORMATIONCSS FOR UNKNOWNNUM CALLINGPARTYTRANSFORMATIONCSS FOR SUBSCRIBERNUM GEO LOCATION USE DEVPOOL CALLINGPARTYTRANSFORMCSS NATIONAL USE DEVPOOL CALLINGPARTYTRANSFORMCSS INTNATIONAL USE DEVPOOL CALLINGPARTYTRANSFORMCSS UNKNOWN USE DEVPOOL CALLINGPARTYTRANSFORMCSS SUBSCRIBE ALWAYS USE PRIME LINE ALWAYS USE PRIME LINE FOR VOICE MESSAGE HOTLINE DEVICE DEVICE TRUST MODE DIRECTORY NUMBER 1 ROUTE PARTITION 1 LINE DESCRIPTION 1 ALERTING NAME 1 ASCII ALERTING NAME 1 VOICE MAIL PROFILE 1 LINE CSS 1 LINE PRESENCE GROUP 1 LINE USER HOLD MOH AUDIO SOURCE 1 LINE NETWORK HOLD MOH AUDIO SOURCE 1 AAR VOICE MAIL 1 AAR DESTINATION MASK 1 AAR GROUP(LINE) 1 RETAIN THIS DESTINATION IN CALL FORWARDING HISTORY 1 CALLING SEARCH SPACE ACTIVATION POLICY 1 FORWARD BUSY INTERNAL VOICE MAIL 1 FORWARD BUSY INTERNAL DESTINATION 1 FORWARD BUSY INTERNAL CSS 1 FORWARD BUSY EXTERNAL VOICE MAIL 1 FORWARD BUSY EXTERNAL DESTINATION 1 FORWARD BUSY EXTERNAL CSS 1 FORWARD NO ANSWER INTERNAL VOICE MAIL 1 FORWARD NO ANSWER INTERNAL DESTINATION 1 FORWARD NO ANSWER INTERNAL CSS 1 FORWARD NO ANSWER EXTERNAL VOICE MAIL 1 FORWARD NO ANSWER EXTERNAL DESTINATION 1 FORWARD NO ANSWER EXTERNAL CSS 1 FORWARD NO COVERAGE INTERNAL VOICE MAIL 1 FORWARD NO COVERAGE INTERNAL DESTINATION 1 FORWARD NO COVERAGE INTERNAL CSS 1 FORWARD NO COVERAGE EXTERNAL VOICE MAIL 1 FORWARD NO COVERAGE EXTERNAL DESTINATION 1 FORWARD NO COVERAGE EXTERNAL CSS 1 FORWARD ON CTI FAILURE VOICE MAIL 1 FORWARD ON CTI FAILURE DESTINATION 1 FORWARD ON CTI FAILURE CALLING SEARCH SPACE 1 FORWARD UNREGISTERED INTERNAL VOICE MAIL 1 FORWARD UNREGISTERED INTERNAL DESTINATION 1 FORWARD UNREGISTERED INTERNAL CALLING SEARCH SPACE 1 FORWARD UNREGISTERED EXTERNAL VOICE MAIL 1 FORWARD UNREGISTERED EXTERNAL DESTINATION 1 FORWARD UNREGISTERED EXTERNAL CALLING SEARCH SPACE 1 FORWARD NO ANSWER RING DURATION 1 MLPP TARGET 1 MLPP CSS 1 MLPP NO ANSWER RING DURATION 1 HOLD REVERSION RING DURATION (SECONDS) 1 HOLD REVERSION NOTIFICATION INTERVAL (SECONDS) 1 CALLER NAME 1 CALLER NUMBER 1 REDIRECTED NUMBER 1 DIALED NUMBER 1 PARTY ENTRANCE TONE 1 PARK MONITOR FORWARD NO RETRIEVE EXT DESTINATION 1 PARK MONITOR FORWARD NO RETRIEVE INT DESTINATION 1 PARK MONITOR FORWARD NO RETRIEVE INT VOICE MAIL 1 PARK MONITOR FORWARD NO RETRIEVE EXT VOICE MAIL 1 PARK MONITOR FORWARD NO RETRIEVE EXT CSS 1 PARK MONITOR FORWARD NO RETRIEVE INT CSS 1 PARK MONITORING REVERSION TIMER 1 DISPLAY 1 ASCII DISPLAY 1 EXTERNAL PHONE NUMBER MASK 1 MONITORING CALLING SEARCH SPACE 1 MAXIMUM NUMBER OF CALLS 1 BUSY TRIGGER 1 SECONDARY CALLING SEARCH SPACE FOR FORWARD ALL 1 FORWARD ALL VOICE MAIL 1 FORWARD ALL DESTINATION 1 FORWARD ALL CSS 1 CALL PICKUP GROUP 1

1 Accepted Solution

Accepted Solutions

Hi Tony

Everything in the export should be used in the import... just edit the bits you need to.

Aaron

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

View solution in original post

8 Replies 8

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

Yes, you can do this. I've done it a few times.

You tend to find that two things change:

1) The names of the fields change, or fields might be removed in the newer version. Those fields need manipulating or removing as appropriate.

2) The names of elements in the clusters (e.g. CSSs, device pools etc etc) are probably different. Those need find/replacing to match.

The other complication is that if you use a spreadhseet editor e.g. Excel to manipulate the CSV, it will often corrupt fields or make inappropriate substitutions. I have had more success with LibreOffice Calc as it is more 'dumb'. Once you have edited it, run it through a program like Diffmerge to compare the output files and ensure you only see the changes you expect.

What I ended up doing is writing some CSV manipulation tools in Java that take a list of rules (i.e. replace X with Y in Device Pool, replace A with B in Calling Search Space, replace G with H in all fields, etc etc.) and then processes the output files for me. 

That way I can repeat the same process of export, manipulation and import reliably and ensure only what I want to change is changed...

Aaron

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

Hi Aaron

Thanks for your reply.

I assume you are describing BAT and not import/export. Which one i use doesn't matter to me as long as it works and makes my job easier.

1) As both clusters are on the same version i guess nothing changes.

2) You descibe what i'm trying to do, using excel. Just a simple search 'n' replace should do the trick to change the values needed to change.

I will test LibreOffice as i have the same experience as you using Excel. Excel does many strange things i really don't understand when i'm changing the values, and even when saving the document as CSV it saves it with semi-colon instread of colon.

As my programming/scripting skills are none existent, i'll skip that part :)

Hi

1. Yup

2. Yep - just be aware of replacing a string (e.g. 'uk') that might appear in a calling search space for example, but also in other fields where it corrupts the data (e.g in a dev pool name that you don't want to change). Generally for stuff like that you'll get sensible feedback from BAT, it's stuff like the formatting/colons/commas/quotes/xml that Excel can screw up.

If you don't get on with LibreOffice for edits and DiffMerge for checks then come back for more ;-)

Aaron

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

Hi

I'm starting all over using LibreOffice Calc and DiffMerge :)

When doing an export, one gets an rar-file which includes a header.txt file. Is this file important to the export (content, checksum, etc)? Do i have to include this in the import?

/Tony

Hi

Yeah, just make sure it's there.. basically copy the .rar, take out the main CSV, edit it, and then put it back in the copy you created.

Aaron

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

Hi

Does this need to be included?

Entity:GATEWAY
Entity:SLOTCONFIGURATION
Entity:ANALOG

Does all this need to match:

gateway.tar - gateway.csv - gateway (file mention in the header file)?

And i got it to work when i inserted the gateways (as a BAT) first and then importing the gateways including the slots and lines :)

/Tony

Hi Tony

Everything in the export should be used in the import... just edit the bits you need to.

Aaron

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

Hi Aaron

I had to add the gateways (and only the gateways) first, then i could import the gateways (which included the slots, lines and DNs).

A bit weird but it worked. Tested it twice.

Thanks for you help, Aaron.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: