User Tools

Site Tools


en:migrage-tms

Migration Tvip TMS between servers

Creating dump your DataBase

Create dump your PostgreSQL database with “pg_dump” tool

pg_dump --no-owner --exclude-table-data=device_stat_channel -U tvip-tms tvip-tms  >  /backup/tvip-tms.sql

:!: If you need make dumps of others databases

pg_dump --no-owner -U tvip-tms tvip-tms-audit >  /backup/tvip-tms-audit.sql
pg_dump --no-owner -U tvip-tms tvip-tms-vod >  /backup/tvip-tms-vod.sql

Copy dump of databases to new TMS server

Copy dump of database to new TMS server with “scp” tool.

scp /backup/tvip-tms.sql username@host:/backup/

Creating database

Before install TVIP TMS, you should install PostgreSQL and restore dump of Database.

  • Setup and check of locale

Run this cli command:

sudo dpkg-reconfigure locales

Make sure the locale is selected: “[*] en_US.UTF-8 UTF-8” and others locale what you need, and select them if you'd like it.

  • Install PostgreSQL Database:
sudo apt -y install postgresql
  • Create user tvip-tms and database tvip-tms with owner tvip-tms
su -c "createuser tvip-tms && createdb -O tvip-tms tvip-tms" postgres

:!: If you use other databases then create them:

su -c "createdb -O tvip-tms tvip-tms-audit" postgres
su -c "createdb -O tvip-tms tvip-tms-vod" postgres

Restore the dump of database

  • Change auth method to postgres:
sed -i /etc/postgresql/*/main/pg_hba.conf -e "s|local   all             all                                     peer|local   all             all                                     trust|"
sed -i /etc/postgresql/*/main/pg_hba.conf -e "s|host    all             all             127.0.0.1/32            md5|host    all             all             127.0.0.1/32            trust|"
systemctl reload postgresql 
  • Restore the dump of database:
psql -U tvip-tms tvip-tms  < /backup/tvip-tms.sql
  • Reset authentication keys auth key:
psql -U tvip-tms tvip-tms
update device set authkey = null;
\q

Deploy new TMS

Make sure, your server has minimal system requirements
system requirements:

  • Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
  • Minimum 32 GB of RAM
  • Minimum 500 GB (free disk space) for minimum 4000 active and online devices.

Installation is recommended on Ubuntu LTS 18.04, 20.04

Installation:

echo "deb http://deb.packages.tvip.ru/ xenial main" >> /etc/apt/sources.list.d/tms.list
wget --quiet -O - http://deb.packages.tvip.ru/deploy/key.asc | apt-key add -
apt-get update
apt-get install tvip-tms-standalone

Post migration procedure

Enable “Allow quick binding​” option on provider settings. Quick binding option allow authorization device without ask login/password.

  • Change ip of server or change DNS record to route clients to new TMS.
en/migrage-tms.txt · Last modified: 2022/03/14 14:56 by Денис Цыганов