How to migrate TrueConf Server from Windows to Linux

Our customers often decide to migrate from Windows to Linux due to a number of factors, including the ease of administration, malware attack mitigation and the need to reduce the cost of licensing. Besides, the software used in such cases should be backward compatible. At TrueConf, we value the time of our clients; so we made sure that it is easy to export data from one server to another.
For successful data migration of TrueConf Server and subsequent testing, we recommend using a separate machine (either a physical server or a virtual machine). Once the migration is complete, you will be able to verify all settings and re-register the license (link it to the new HW key configuration). In our example, we will use network data transfer, so your machines (both current and new) must be accessible to each other. If this is not possible, use removable media for data transfer.
Important! Please take into account that chat history can be saved only if the public server name remains unchanged because the sender of messages is determined by the full TrueConf ID.
Step 1. TrueConf Server update
To migrate successfully, you need to make sure that the new server installed on Linux and the current server on Windows are of the same version. Our Linux repository always includes only the latest version of the distro. We do not provide earlier versions of the server due to security reasons. So, we suggest updating TrueConf Server for Windows up to the latest version. Read this article to learn how it can be done.
Step 2. Server data export
To migrate TrueConf Server, you will need the registration key of your TrueConf Server instance and the backup copies listed below.
Please note that you will not be able to move your TrueConf Server from your current PC to a different one without taking these steps.
Registration key
The registration key cannot be found directly in the control panel due to security reasons. This key was sent to you in the email confirming the registration of your TrueConf Server instance. To find this email, search by content and specify Server ID which can be found in the Summary → License info section.
Main data
Registry
The registry stores the data about users, groups, aliases, conferences, streams, and server settings (LDAP, SIP/H.323, WebRTC, federation parameters etc.). We will describe how to transfer the registry later in this article.
Database
The database stores the information from the Reports section of TrueConf Server, including chat history.
How to check the current port number
To make sure that the data is exported successfully, you need to specify the number of the port used for connecting to the database. The 5444 port is used by default.
Since the port could be changed at some point in the past (e.g., the port could be set to 5432 after updating TrueConf Server from versions earlier than 5.2.9), run this command in the terminal to check the current port number:
findstr port "C:\Program Files\TrueConf Server\database\conf\postgresql.conf"Export
Open the command line as the administrator and go to the following directory:
cd /d [backup]where [backup] is the directory to which the database will be exported, for example:
cd /d D:\backupThen, run this command to export data:
"C:\Program Files\TrueConf Server\database\bin\pg_dumpall.exe" -p 5444 -U postgres -c -f tcs.dumpData export may take much time if a large number of chats is stored on the server.
HTTPS Settings
If you have HTTPS configured, the key and certificate files are stored in the [installation_path]\httpconf\ssl directory, where [installation_path] is the server installation path. If desired, you can move them to a new server. We will explain how to do this later in the article.
Additional data
Conference and call recordings
If conferences or calls are automatically recorded on the server side, the files will be saved in the Recordings folder by default (this folder can be found in the TrueConf Server working directory). To find the location of video files, check the Path field in the Recordings section of the TrueConf Server control panel.

If desired, you can move them to a new server. We will explain how to do this later in the article.
Chat files
All chat files shared by the users of your server are saved in the files folder in the TrueConf Server working directory by default. To find their exact location, check the Path field in the File Storage section of the TrueConf Server control panel.

If desired, you can move them to a new server. We will explain how to do this and what issues you may encounter later in the article.
User avatars
Avatars of users registered on your server are stored in the avatars directory in the working folder of TrueConf Server. If desired, you can transfer them to a new server. We will explain how to do this later in the article.
Step 3. Install TrueConf Server
How to install TrueConf Server on Linux from a file and repositories is described in the respective articles: Debian, CentOS Stream.
Do not register TrueConf Server after installation.
Step 4: Importing data to Linux
The data should be imported strictly in the order described below!
To execute commands, use the sudo program to run them with administrative privileges. Ensure that the current OS user is part of the sudo group; refer to the relevant online instructions for your operating system. Note that sudo may not be installed by default on your OS. To check if it’s installed, run the command: sudo -V.
Before proceeding with further actions, disable the TrueConf services:
sudo systemctl stop trueconf-web
sudo systemctl stop trueconf-manager
sudo systemctl stop trueconf-php
sudo systemctl stop trueconf-bridgeIn the following commands, parameters are used that you need to replace with your own values:
{login}– the account of a user who is part of the Administrators group.{ip}– IP address of the Windows machine.
In the subsequent commands on the Linux OS, the scp utility from the OpenSSH package set is used. It is known that some versions have a problem with file transfer: files are truncated to ~200 KB. This bug is fixed in version 9.4 and above. When transferring files, make sure they have been fully transferred.
HTTPS settings
Please note that if you change the server name, you will need to generate a new TLS certificate.
To transfer the TLS certificate and its key, we will use the SCP (Secure Copy Protocol) utility. To do this:
Copy the contents of the ssl folder:
sudo scp -r '{login}@{ip}:"C:/Program Files/TrueConf Server/httpconf/ssl/*"' /opt/trueconf/server/etc/webmanager/ssl/After moving the folder, you need to assign it the necessary permissions:
sudo chown trueconf:trueconf /opt/trueconf/server/etc/webmanager/ssl/* sudo chmod 644 /opt/trueconf/server/etc/webmanager/ssl/*
Configuration files
To transfer other configuration files using the SCP utility:
sudo scp -T '{login}@{ip}:"C:/Program Files/TrueConf Server/httpconf/opt/listen.conf"' /opt/trueconf/server/etc/webmanager/opt/ sudo scp -T '{login}@{ip}:"C:/Program Files/TrueConf Server/httpconf/opt/local_only_admin_24.conf"' /opt/trueconf/server/etc/webmanager/opt/After transferring the files, you need to assign the appropriate permissions to them:
sudo chown trueconf:trueconf /opt/trueconf/server/etc/webmanager/opt/listen.conf /opt/trueconf/server/etc/webmanager/opt/local_only_admin_24.conf sudo chmod 644 /opt/trueconf/server/etc/webmanager/opt/listen.conf /opt/trueconf/server/etc/webmanager/opt/local_only_admin_24.conf
Calls and conference recordings
By default, video recordings on a Windows server are stored in C:/TrueConf/Recordings/. If you are using a different directory, specify the correct path in step 2 of this guide.
To transfer all records, we will use the SCP utility:
sudo scp -r {login}@{ip}:C:/TrueConf/Recordings/* /opt/trueconf/server/var/lib/recordings/After transferring the records, you need to assign the appropriate permissions to them:
sudo chown trueconf:trueconf /opt/trueconf/server/var/lib/recordings/* sudo chmod 644 /opt/trueconf/server/var/lib/recordings/*
Files
Transfer the files to the Linux machine into the default directory /opt/trueconf/server/var/lib/files. This can be done in various ways, such as using a USB drive or SCP. Regardless of the method used, you may encounter difficulties, which we have discussed below.
By default, files on a Windows server are stored in C:/TrueConf/files/. If you are using a different directory, specify the correct path in step 2 of this instruction.
To transfer all files, we will use the SCP utility:
sudo scp -r {login}@{ip}:C:/TrueConf/files/* /opt/trueconf/server/var/lib/files/After transferring the files, you need to assign the appropriate permissions to them:
sudo chown -R trueconf:trueconf /opt/trueconf/server/var/lib/files/* sudo find /opt/trueconf/server/var/lib/files/* -type d -exec chmod 755 {} \; sudo find /opt/trueconf/server/var/lib/files/* -type f -exec chmod 644 {} \;
Next, correct the absolute Windows paths in certain files as described below.
Difficulties in file transfer
Name length
When moving files, one should keep in mind that some files may not be saved. This problem occurs due to different OS restrictions on file name length. The NTFS file system used in Windows supports file names with up to 256 characters encoded in UTF-16. The ext4 file system, which is usually used in Linux, supports at most 255 bytes in UTF-8 encoding. In other words, it can support names with up to 255 Latin characters or 127 characters of other alphabets (e.g., Cyrillic alphabet).
So, the file with a non-English name may not be saved due to the restrictions imposed by the Linux kernel.
Solution
To fix this issue, you may use a different file system for Linux or save at-risk files (the ones with long names) so that they could be later sent to users.
SCP use
The following errors may occur when the files are moved with the help of SCP (Secure Copy Protocol):
Unexpected file name
The file was renamed because its previous name included non-Latin characters.
Some systems do not support certain characters in file names. So, an error may occur if the file name includes such characters.
Solution
After moving the files, please make sure that all the files, which have non-Latin characters in their names, were transferred correctly. Otherwise, you should manually rename these files based on the information from the original server.
Editing absolute paths
To make sure that the files can be correctly downloaded in chats, you need to edit the absolute paths in all utility files *.resume_data. To do it, go to the directory where the files are stored and run this command in the terminal (in this case, blank spaces are used as delimiters):
sed -i 's save_path[1-9]*:C:\\TrueConf\\files\\ save_path75:/opt/trueconf/server/var/lib/files/ ' *.resume_dataUser avatars
To transfer all avatars, we will use the SCP utility:
sudo scp -r {login}@{ip}:C:/TrueConf/avatars/* /opt/trueconf/server/var/lib/avatars/After transferring the avatars, you need to assign them the appropriate permissions:
sudo chown trueconf:trueconf /opt/trueconf/server/var/lib/avatars/* sudo chmod 644 /opt/trueconf/server/var/lib/avatars/*
Database
How to check the current port number
To ensure successful data import, you will need to specify the port used for.connecting to the database. The 5444 port is used by default.
Since the port could be changed at some point in the past (e.g., the port could be set to 5433 after updating TrueConf Server from versions earlier than 5.2.9), run this command in the terminal to check the current port number:
grep port /opt/trueconf/server/etc/database/postgresql.confImport
restart the database service to close all active connections:
sudo systemctl restart trueconf-dbLater, to import the database, you will need to complete the following steps:
Open the terminal (if it was previously closed).
If the source server runs TrueConf Server version 5.5.6 or higher, replace the Windows locale in the dump with the locale supported by Linux, otherwise the import will fail with the
invalid LC_COLLATE locale nameerror:sed -i "s/LOCALE = 'English_United States.1252'/LOCALE = 'en_US.UTF-8'/" /home/$USER/backups/tcs.dumpCopy the exported file to the directory with the database:
sudo cp /home/$USER/backups/tcs.dump /opt/trueconf/server/bin/databaseSign in as the postgres user:
sudo su postgres -s /bin/bashGo to the database directory:
cd /opt/trueconf/server/bin/databaseRun the import command and specify the current port:
./psql -p 5444 -f tcs.dumpThe data import may take much time, if a large number of chats is stored on the server.
Sign out of the postgres user account by running this command:
exit
Registry
Registry data migration
To transfer data from the registry, perform the following:
Connect to the remote machine via SSH using the administrator account:
sudo ssh {login}@{ip}In the opened terminal session, execute the command to export the registry:
"C:\Program Files\TrueConf Server\tc_regkey.exe" export "" registry.csvThe file will be saved in the user's directory under which the connection was made:
C:/Users/{login}/.End the session using the command:
exitCopy the registry.csv file:
sudo scp -r {login}@{ip}:C:/Users/{login}/registry.csv /home/$USER/registry.csv
Removing incompatible strings
To import the registry from a backup file, you will need to delete the lines that are not compatible with Linux. To do it, run the following commands in the terminal:
sed -i '/install_version/d' /home/$USER/registry.csv
sed -i '/Configuration,Working Directory/d' /home/$USER/registry.csv
sed -i '/ConfDefault,Working Directory/d' /home/$USER/registry.csv
sed -i '/Configuration,Executable Path/d' /home/$USER/registry.csv
sed -i '/Configuration,Recordings Path/d' /home/$USER/registry.csv
sed -i '/Configuration,Ffmpeg Path/d' /home/$USER/registry.csv
sed -i '/Configuration,Push Script/d' /home/$USER/registry.csv
sed -i '/Configuration,File Storage Path/d' /home/$USER/registry.csv
sed -i '/Configuration,version/d' /home/$USER/registry.csv
sed -i '/Configuration,DB Connection String/d' /home/$USER/registry.csv
sed -i '/Configuration\\ConfDefault,Working Directory/d' /home/$USER/registry.csv
sed -i '/WebManager,server_dir/d' /home/$USER/registry.csv
sed -i '/WebManager,db_port/d' /home/$USER/registry.csv
sed -i '/WebManager,group_security/d' /home/$USER/registry.csv
sed -i '/WebManager,group_admin/d' /home/$USER/registry.csv
sed -i '/WebManager,client_path/d' /home/$USER/registry.csv
sed -i '/WebManager\\API\\AccessTokens/d' /home/$USER/registry.csv
sed -i '/WebManager\\API\\RefreshTokens\\/d' /home/$USER/registry.csv
sed -i '/Transceivers/d' /home/$USER/registry.csvIP address replacement
If your new server has a different IP address, run the following command in the terminal (this command uses blank spaces as delimiters):
sed -i "s x.x.x.x y.y.y.y " /home/$USER/registry.csv${**PARAM_NAME**:-**POSS_VAL**}
x.x.x.x is the previous IP address with dots (.) escaped, for example, 192.168.0.1.
y.y.y.y is the new IP address where dots are not escaped, for example: 192.168.1.1.
Import settings
Then import the registry settings with this command:
sudo /opt/trueconf/server/bin/vcs/tc_regkey import "" /home/$USER/registry.csvWhen all the data is imported, restart the following TrueConf services by running these commands consecutively:
sudo systemctl restart trueconf-db
sudo systemctl start trueconf-manager
sudo systemctl start trueconf-web
sudo systemctl start trueconf-php
sudo systemctl start trueconf-bridgeLDAP
If integration with LDAP was previously configured, you will need to restore default settings because in Windows and Linux, different default values are used for LDAP parameters. To do it, you will need to open the TrueConf Server control panel, go to the LDAP/Active Directory → LDAP settings → Advanced section, and click the Default and Apply buttons consecutively. If you specified some other parameters in the Advanced section, you will need to specify them again and save settings.
If you do not take these steps, there may be user authorization problems.
Kerberos SSO
If you had Kerberos authentication configured, you need to upload the keytab file again in the server control panel.
Step 5. Testing data migration
Go to the control panel and check if the following data were moved correctly:
Users and their avatars
Conferences
Chat messages
SMTP settings
Gateway settings
Reports
Other types of information.
Besides, with client applications you can test these features:
Authorization on the server, including SSO/ADFS if they were configured
Address book, chat list, conferences in the scheduler
Availability of chat files for download.
Go to the control panel and check if all the data (avatars, reports, chat messages, users, conferences and other types of information) were correctly imported. If some errors occurred , for example, you mistyped a command and some of the data was not exported, uninstall the server completely and repeat steps 2 and 3.
If all the data was successfully imported, please contact the technical support to reset the hardware key (HW key) to which your license is bound. TrueConf technical support will reset the hardware key for free. You will need to submit a ticket and specify the ID of your server. When the technical support resets the hardware key, please register the server again.
Important! Do not change the public server name when registering the server; this name should remain unchanged for the correct display of chat messages. If you change this name, chat messages will not be displayed in client applications.
We wish you successful conferencing!