How to export TrueConf Server data from Linux to Windows

The approach to storing TrueConf Server settings depenads on the OS. In Windows, a part of the information is stored in the registry which is not included in Linux. Besides, there are some platform-specific parameters. This is why it is necessary to use a separate utility when importing/exporting the data required by TrueConf Server.
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 Windows and the current server are of the same version. On our website, only the latest version of the installation file is available for download. We do not provide earlier versions of the server due to security reasons. So, we suggest updating the current TrueConf Server instance to the latest version. Read this article to learn how it can be done.
Step 2. Server data export
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.
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
Database
The database stores all TrueConf Server settings, including chat history and reports.
How to check the current port number
To export the database, you will need to specify the port needed 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.confExport
Then, complete the following steps to export the database:
Open the terminal (if it was previously closed).
Sign in as the postgres user:
sudo su postgresGo to the database directory:
cd /opt/trueconf/server/bin/databaseRun the following command and specify the current port:
./pg_dump -p 5444 -c -C -d tcs -f tcs.dumpThis will initiate the process of saving the dump in the current directory. You can specify your own path, but the file should not be saved in
/opt/to avoid access errors.Data export 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:
exitMove the file to the home directory or to a portable drive:
sudo mv /opt/trueconf/server/bin/database/tcs.dump /home/$USER/backupsIf the source server runs TrueConf Server version 5.5.6 or higher, replace the Linux locale in the dump with the locale supported by Windows, otherwise the import will fail with the
invalid LC_COLLATE locale nameerror:sudo sed -i "s/LOCALE = 'en_US.UTF-8'/LOCALE = 'English_United States.1252'/" /home/$USER/backups/tcs.dump
Later, we will refer to this folder as an example. To access it, run this command after copying all the data:
sudo chmod -R 777 /home/$USER/backupsRegistry
On Windows, the information about groups, aliases, conferences, streams, server settings (parameters for LDAP, SIP/H.323, WebRTC, federation and so forth) are stored in the registry.
To export these settings run this command in the terminal:
sudo /opt/trueconf/server/bin/vcs/tc_regkey export "" /home/$USER/backups/registry.csvTo ensure correct transfer of registry from the backup file, you will need to delete the lines that are incompatible with Windows. To do it, run these commands in the terminal:
sed -i '/Configuration,Working Directory/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,Executable Path/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,Recordings Path/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,Ffmpeg Path/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,Push Script/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,File Storage Path/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,version/d' /home/$USER/backups/registry.csv
sed -i '/Configuration,DB Connection String/d' /home/$USER/backups/registry.csv
sed -i '/Configuration\\ConfDefault,Working Directory/d' /home/$USER/backups/registry.csv
sed -i '/WebManager,server_dir/d' /home/$USER/backups/registry.csv
sed -i '/WebManager,db_port/d' /home/$USER/backups/registry.csv
sed -i '/WebManager,group_security/d' /home/$USER/backups/registry.csv
sed -i '/WebManager,group_admin/d' /home/$USER/backups/registry.csv
sed -i '/WebManager,client_path/d' /home/$USER/backups/registry.csv
sed -i '/Transceivers/d' /home/$USER/backups/registry.csv
sed -i '/WebManager\\API\\AccessTokens/d' /home/$USER/backups/registry.csv
sed -i '/WebManager\\API\\RefreshTokens\\/d' /home/$USER/backups/registry.csv
sed -i 's/ffmpeg\.exe/\/opt\/trueconf\/server\/bin\/ffmpeg\/ffmpeg\//' /home/$USER/backups/registry.csvIf the new server has a different IP address, execute the following command in the terminal:
sed -i "s/x\.x\.x\.x/y.y.y.y/" /home/$USER/backups/registry.csv${**PARAM_NAME**:-**POSS_VAL**}
where: 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.
y.y.y.y is the new IP address where dots are not escaped, for example: 192.168.1.1.
HTTPS Settings
/opt/trueconf/server/etc/webmanager/ssl
Save the backup copy of this directory:
sudo cp -R /opt/trueconf/server/etc/webmanager/ssl /home/$USER/backupsAdditional 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 you need to move them to a new server, just copy necessary recordings.
sudo cp -R /opt/trueconf/server/var/lib/recordings /home/$USER/backupsChat 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 it is necessary to move them to the new server, save the backup of this directory. For example, to copy the chat files to the home directory of the current OS user, execute this command:
sudo cp -R /opt/trueconf/server/var/lib/files /home/$USER/backupsLog files
Log files may be needed when submitting a ticket to technical support (e.g., to analyze the issues you had when using the previous instance of TrueConf Server).
Log files may be needed when submitting a ticket to technical support (e.g., to analyze the issues you had when using the previous instance of TrueConf Server). The log files are located in the TrueConf installation folder at the path /opt/trueconf/server/var/log. To export them, create a backup copy of all directories and files with the cp command that we have already mentioned:
sudo cp -R /opt/trueconf/server/var/log /home/$USER/backupsUser avatars
Avatars the users registered on your TrueConf Server instance are stored in the avatars directory in the TrueConf Server working directory. Copy this directory to a convenient location on your server.
By default, it is located at the path /opt/trueconf/server/var/lib; however, you can check the location in the Control panel → Settings section (Working path block).

Copy the directory with this command:
sudo cp -R /opt/trueconf/server/var/lib/avatars /home/$USER/backupsStep 3. Install TrueConf Server
Check this article to learn how TrueConf Server can be installed from a file and repository.
Do not register TrueConf Server after installation.
Step 4. Data import
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 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"Import
Disable TrueConf services and restart the database service to close all active connections. For this purpose, run these commands as the administrator:
sc stop "TrueConf Web Manager"
sc stop trueconf-manager
sc stop "TrueConf Database"
sc start "TrueConf Database"Next, run the following command to import data:
"C:\Program Files\TrueConf Server\database\bin\psql.exe" -p 5444 -U postgres -f tcs.dumpThe data import may take much time, if a large number of chats is stored on the server.
Registry
To import the registry, run this command:
"C:\Program Files\TrueConf Server\tc_regkey.exe" import "" registry.csvWhen all the data is imported, restart the following TrueConf Server services by running these commands consecutively:
sc stop "TrueConf Database"
sc start "TrueConf Database"
sc start "TrueConf Web Manager"
sc start trueconf-managerHTTPS Settings
Copy the exported folder with the SSL key and certificate to this directory
[installation_path]\httpconf\ssl, where[installation_path]– the server installation path.Go to the TrueConf Server control panel.
In the Web → HTTPS section, apply the same key and certificate settings that were used on the previous instance of TrueConf Server.
Additional data
Copy other data saved in Step 2 to the corresponding directories of the new server:
Conferences recordings –
recordingsdirectory in the working directory (by default)Chat files – to the
filesdirectory in the working directory (by default)Logs — to the working directory
Avatars – to the
avatarsdirectory in the working directory.
When all the data are imported, restart the following TrueConf services by running a number of terminal commands consecutively as the administrator:
sc stop "TrueConf Web Manager"
sc start "TrueConf Web Manager"
sc stop trueconf-manager
sc start trueconf-managerStep 5. Testing data migration
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 it, chat messages will not be displayed in client applications.
We wish you successful conferencing!