How to change Tegsoft Server Hardware?

You are here:
  • KB Home
  • How to change Tegsoft Server Hardware?
Estimated reading time: 3 min

This article is for moving Tegsoft Software from one server to another. The process defined here is only for on-premise server usage. Cloud migration is out of the scope of this document.

The current active server that data will be migrated from will be called as OLD_SERVER.

The destination server to be active will be called NEW_SERVER.

Changing requires steps below,

  1. Transferring database 
  2. Transferring TTS Cache
  3. Transferring voice recordings

1. Transferring Database

There are two ways to transfer the database from OLD_SERVER to the NEW_SERVER. 

  1. OFFLINE: If it is possible to stop servicing during the transfer, this is the recommended method. It is faster, easier, has fewer steps/actions and there will be no data loss.
  2. ONLINE: If it is not possible to stop service during the transfer this is the only method for transferring the database. This method is based on EXPORT – IMPORT phases. Data after EXPORT will be lost and can not be migrated to NEW_SERVER with IMPORT.

1.1. Offline Database Transfer

Warning: This method will cause downtime. If it is not possible to pause/stop servicing please go step 1.2.

1.1.1. Preparation of servers

  • Upgrade OLD_SERVER and NEW_SERVER (both servers).
  • Stop active running processes OLD_SERVER and NEW_SERVER (both servers) with the commands below.

Connect to OLD_SERVER via SSH

killall java

killall java

killall java

killall java

Continue until you see “no proc…”

service tegsoft_db stop

service tegsoft_db stop

Continue until you see ”no start database ..”

Disconnect from OLD_SERVER 

Connect to NEW_SERVER via SSH

killall java

killall java

killall java

killall java

Continue until you see “no proc…”

service tegsoft_db stop

service tegsoft_db stop

Continue until you see ”no start database ..”

  1. Move active database folder to a backup folder

Connect to NEW SERVER via SSH

rm -rf /root/bk

mkdir /root/bk

mv /home/tobe/tobe /root/bk/

1.1.2. Transfer database from old to new

Connect to NEW SERVER via SSH

scp -r -P 2222 [email protected]_SERVER_IP:/home/tobe/tobe /home/tobe/

chown -R tobe.tobe /home/tobe/tobe

/opt/ibm/db2/V9.7/instance/db2iupdt tobe

service tegsoft_db restart

su – tobe (Please make sure you type minus (-) may be paste wrong)

db2 upgrade database tobe

exit

service tegsoft_icr restart

service tegsoft_web restart

1.2. Online Database Transfer

1.2.1. Exporting Data From OLD_SERVER

Connect to OLD_SERVER via SSH

su – tobe (Please make sure you type minus (-) may be paste wrong)

rm -rf tmp;mkdir tmp;cd tmp

db2look -d tobe -e -z tobe -i tobe -w t1be -o /home/tobe/tmp/allddl.sql

db2move tobe EXPORT -aw -u tobe -p t1be

cd /home/tobe

rm -rf /home/tobe/transfer.tgz

tar -czf /home/tobe/transfer.tgz ./tmp

1.2.2. Transfer database from old to new

Connect to NEW_SERVER via SSH

/root/tegsoft_fixdate.sh

killall java

killall java

killall java

killall java

Continue until you see “no proc…”

service tegsoft_db stop

service tegsoft_db stop

Continue until you see ”no start database ..”

rm -rf /home/tobe/tmp

scp -r -P 2222 [email protected]_SERVER_IP:/home/tobe/transfer.tgz /home/tobe/transfer.tgz

chown -R tobe.tobe /home/tobe/transfer.tgz

service tegsoft_db start

su – tobe (Please make sure you type minus (-) may be paste wrong)

db2 drop database tobe

db2 “CREATE DATABASE tobe automatic storage yes USING CODESET UTF-8 TERRITORY TR pagesize 32 K” (Please check double quote)

mkdir /home/tobe/tobe/NODE0000/MIRRORLOGPATH

chown tobe.tobe /home/tobe/tobe/NODE0000/MIRRORLOGPATH

db2 update db cfg for tobe using MIRRORLOGPATH /home/tobe/tobe/NODE0000/MIRRORLOGPATH

db2 update db cfg for tobe using logfilsiz 10000 logprimary 30 logsecond 30

tar -xzvf transfer.tgz 

cd /home/tobe/tmp

db2stop

db2start

db2 connect to tobe

db2 -Ctvf /home/tobe/tmp/allddl.sql (This command will ask password use t1be for password)

db2move tobe LOAD -u tobe -p t1be

db2 “SET INTEGRITY FOR TBLCOLUMNS IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLTABLES IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLPBX IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLUNITS IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLLICENSE IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLCCTEMPLATES IMMEDIATE CHECKED”

db2 “SET INTEGRITY FOR TBLCRMGRP IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXINROUTE IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXTIMEGRP IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXTIMEMEM IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXEXT IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXCONTEXT IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXOUTROUTE IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXCONTEXTROUTE IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXTRUNK IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXOUTRTTRNK IMMEDIATE CHECKED”
db2 “SET INTEGRITY FOR TBLPBXOUTRTPTNR IMMEDIATE CHECKED”

db2 “commit”

exit

service tegsoft_icr restart

service tegsoft_web restart

2. Transfer TTS Cache

Connect to NEW_SERVER via SSH

scp -r -P 2222 [email protected]_SERVER_IP:/var/lib/asterisk/sounds/tts /var/lib/asterisk/sounds/

3. Transfer Voice Recording Files

Voice recording files can be already archived if so mount the same archive folder to the new server.

If recordings will be transferred from OLD server local disk to NEW server local disk connect to OLD server windows share and NEW server windows share copy recordings from OLD share location to NEW share location.

\\OLD_SERVER_IP\recordings

\\NEW_SERVER_IP\recordings

Was this article helpful?
Dislike 0
Views: 36