{"id":21730,"date":"2023-11-01T22:15:29","date_gmt":"2023-11-01T19:15:29","guid":{"rendered":"https:\/\/trueconf.com/blog\/?p=21730"},"modified":"2023-11-01T22:59:16","modified_gmt":"2023-11-01T19:59:16","slug":"migrating-trueconf-server-for-linux","status":"publish","type":"post","link":"https:\/\/trueconf.com/blog\/knowledge-base\/migrating-trueconf-server-for-linux","title":{"rendered":"Migrating TrueConf Server from Linux to Linux"},"content":{"rendered":"<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux.png\" data-rel=\"lightbox-gallery-aV06w3kK\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-21733\" src=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux.png\" alt=\"\" width=\"1200\" height=\"600\" loading=\"lazy\" title=\"\" srcset=\"https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux.png 1200w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux-690x345.png 690w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux-1024x512.png 1024w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux-768x384.png 768w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-to-linux-290x145.png 290w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p>Sometimes, it may be necessary to migrate <a href=\"https:\/\/trueconf.com\/products\/server\/video-conferencing-server.html\" target=\"_blank\" rel=\"noopener\">TrueConf Server <\/a>to a different virtual machine or computer. This also includes the cases when a Linux-based OS is used. <!--more-->You will be able to save the following types of data:<\/p>\n<ol>\n<li>Database export:\n<ul>\n<li aria-level=\"1\">Server settings<\/li>\n<li aria-level=\"1\">User and group settings<\/li>\n<li aria-level=\"1\">Conferences and templates<\/li>\n<li aria-level=\"1\">Reports.<\/li>\n<\/ul>\n<\/li>\n<li>If you are using HTTPS, you will be able to export the certificate files.<\/li>\n<li>It is also possible to export such additional data as:\n<ul>\n<li aria-level=\"1\">Conference recordings<\/li>\n<li aria-level=\"1\">Files sent via chats<\/li>\n<li aria-level=\"1\">Server logs<\/li>\n<li aria-level=\"1\">User avatars.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>This guide can also be used for migrating TrueConf Server from one Linux-based system to another, e.g., from Debian to Red Hat Enterprise.<\/p>\n<div class=\"marked_note marked_note--danger\">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.<\/div>\n<div><\/div>\n<div class=\"marked_note\">Use the <b>sudo<\/b> program to run the commands in administrator mode, Please make sure that the current user is added to the <b>sudo<\/b> group (check the corresponding instructions for your OS on the Internet). You need to take into account that the <b>sudo<\/b> may not be installed on your OS by default. To check, if this command is available, run <code>sudo -V<\/code>.<\/div>\n<h2>Step 1.\u00a0TrueConf Server update<\/h2>\n<p>To migrate successfully, you need to make sure that the new server installed on Linux and the current server 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 the current server to the latest version. Read <a href=\"https:\/\/trueconf.com\/products\/server\/howto-update-trueconf-server.html\" target=\"_blank\" rel=\"noopener\">this article<\/a> to learn how it can be done.<\/p>\n<h2>Step 2. Server data export<\/h2>\n<p>To migrate TrueConf Server, you will need the <a href=\"https:\/\/trueconf.com\/blog\/wiki\/registration-key\" target=\"_blank\" rel=\"noopener\">registration key<\/a> of your TrueConf Server instance and the backup copies listed below.<\/p>\n<div class=\"marked_note marked_note--danger\">Please note that the migration of TrueConf Server from one machine to another will be impossible without these preliminary actions.<\/div>\n<h3>Registration key<\/h3>\n<p>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,\u00a0 search by content and specify <a href=\"https:\/\/trueconf.com\/blog\/wiki\/server-id\" target=\"_blank\" rel=\"noopener\">Server ID<\/a>\u00a0 which can be found in the <strong>Summary \u2192 License info<\/strong> section.<\/p>\n<h3>Main data<\/h3>\n<h4>Database<\/h4>\n<p>The database stores all TrueConf Server settings, including chat history and reports.<\/p>\n<h5>How to check the current port number<\/h5>\n<p>To export the database, you will need to specify the port needed for connecting to the database. The <code>5444<\/code> port is used by default.<\/p>\n<p>Since the port could be changed at some point in the past (e.g., the port could be set to <code>5433<\/code> after updating TrueConf Server from versions earlier that 5.2.9), run this command in the terminal to check the current port number:<\/p>\n<pre class=\"lang:default decode:true \">grep port \/opt\/trueconf\/server\/etc\/database\/postgresql.conf<\/pre>\n<h5>Export<\/h5>\n<p>Then, complete the following steps to export the database:<\/p>\n<ol>\n<li aria-level=\"1\">Open the terminal (if it was previously closed).<\/li>\n<li aria-level=\"1\">Sign in as the <b>postgres<\/b> user:\n<pre class=\"lang:default decode:true\">sudo su postgres<\/pre>\n<\/li>\n<li aria-level=\"1\">Go to the database directory:\n<pre class=\"lang:default decode:true\">cd \/opt\/trueconf\/server\/bin\/database<\/pre>\n<\/li>\n<li aria-level=\"1\">Run the following command and specify <a href=\"#Database\">the port<\/a> that will be used:\n<pre class=\"lang:default decode:true\">.\/pg_dump -p 5444 -c -C -d tcs -f tcs.dump<\/pre>\n<div class=\"marked_note marked_note--warning\">Data export may take much time if a large number of chats is stored on the server.<\/div>\n<\/li>\n<li aria-level=\"1\">Sign out of the <b>postgres<\/b> user account by running this command:\n<pre class=\"lang:default decode:true\">exit<\/pre>\n<\/li>\n<li aria-level=\"1\">Move the file to the home directory or to a portable drive:\n<pre class=\"lang:default decode:true\">sudo mv \/opt\/trueconf\/server\/bin\/database\/tcs.dump \/home\/$USER\/server_backup<\/pre>\n<\/li>\n<\/ol>\n<p>Later, we will refer to this folder as an example. To access it, run this command after copying all the data:<\/p>\n<pre class=\"lang:default decode:true \">sudo chmod -R 777 \/home\/$USER\/server_backup<\/pre>\n<h3>HTTPS settings<\/h3>\n<p>If you have configured HTTPS, the key and certificate files will be stored in the directory:<\/p>\n<pre class=\"lang:default decode:true \">\/opt\/trueconf\/server\/etc\/webmanager\/ssl<\/pre>\n<p>To save the backup copy of this folder, run this command:<\/p>\n<pre class=\"lang:default decode:true\">sudo cp -R \/opt\/trueconf\/server\/etc\/webmanager\/ssl \/home\/$USER\/server_backup<\/pre>\n<h3>Additional data<\/h3>\n<h4>Conference and call recordings<\/h4>\n<p>When calls or conferences are <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/web-config\/#conference-recordings\" target=\"_blank\" rel=\"noopener\">automatically recorded<\/a> on the server side, they are saved in the <code>recordings<\/code> folder. To find out the exact location, check the value of the <strong>Path<\/strong> field in the <strong>Recordings<\/strong> section of the control panel.<\/p>\n<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en.png\" data-rel=\"lightbox-gallery-aV06w3kK\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-21736\" style=\"border: 1px solid #D1CCCC;\" src=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en.png\" alt=\"\" width=\"963\" height=\"300\" loading=\"lazy\" title=\"\" srcset=\"https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en.png 1124w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en-690x215.png 690w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en-1024x319.png 1024w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en-768x239.png 768w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-recordings-path-en-290x90.png 290w\" sizes=\"auto, (max-width: 963px) 100vw, 963px\" \/><\/a><\/p>\n<p>If you need to move them to a different server, just save the copy of the selected conference recordings. To do it, run this command:<\/p>\n<pre class=\"lang:default decode:true\">sudo cp -R \/opt\/trueconf\/server\/var\/lib\/recordings \/home\/$USER\/server_backup<\/pre>\n<h3>Chat files<\/h3>\n<p>By default, the files sent by users in chats are saved in the <code>files<\/code> folder of the TrueConf Server working directory. To find out the exact location, check the value in the <strong>Path<\/strong> field of the <strong>File Storage<\/strong> section in the control panel:<\/p>\n<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en.png\" data-rel=\"lightbox-gallery-aV06w3kK\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-21738\" style=\"border: 1px solid #D1CCCC;\" src=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en.png\" alt=\"\" width=\"866\" height=\"320\" loading=\"lazy\" title=\"\" srcset=\"https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en.png 966w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en-690x255.png 690w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en-768x284.png 768w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-files-path-en-290x107.png 290w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/a><\/p>\n<p>If you want to move the files to a different server, save the backup copy of this directory. For example, to copy the chat files to the home directory of the current OS user, run this command:<\/p>\n<pre class=\"lang:default decode:true\">sudo cp -R \/opt\/trueconf\/server\/var\/lib\/files \/home\/$USER\/server_backup<\/pre>\n<h3>Log files<\/h3>\n<p>Log files are needed when contacting the technical support. For example, they may be needed to analyze the potential issues that could occur when using the previous instance of TrueConf Server.<\/p>\n<p>The log files are stored here <code>\/opt\/trueconf\/server\/var\/log<\/code>. To move, create the copy of all directories and files with the cp command:<\/p>\n<pre class=\"lang:default decode:true\">sudo cp -R \/opt\/trueconf\/server\/var\/log \/home\/$USER\/server_backup<\/pre>\n<h3>User avatars<\/h3>\n<p>The avatars of registered users are stored in the <code>avatars<\/code> folder of the TrueConf Server working directory. Copy this folder to the selected location.<\/p>\n<p>By default, this folder can be found here <code>\/opt\/trueconf\/server\/var\/lib<\/code>. But, you can check it in the <strong>Dashboard\u00a0 \u2192 Settings<\/strong> section in the <strong>Work path<\/strong> sub-section.<\/p>\n<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en.png\" data-rel=\"lightbox-gallery-aV06w3kK\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter wp-image-21739\" style=\"border: 1px solid #D1CCCC;\" src=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en.png\" alt=\"\" width=\"797\" height=\"120\" loading=\"lazy\" title=\"\" srcset=\"https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en.png 983w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en-690x104.png 690w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en-768x116.png 768w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en-290x44.png 290w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a><\/p>\n<p>Run this command to copy the directory:<\/p>\n<pre class=\"lang:default decode:true \">sudo cp -R \/opt\/trueconf\/server\/var\/lib \/home\/$USER\/server_backup<\/pre>\n<h2>Step 3. Install TrueConf Server<\/h2>\n<p>Check out <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/install-and-set-up-your-video-conferencing-server-for-linux-in-15-minutes.html\" target=\"_blank\" rel=\"noopener\">this article<\/a> to learn more about the installation of TrueConf Server from a file and repositories.<\/p>\n<div class=\"marked_note marked_note--danger\"><b>Do not<\/b> register TrueConf Server after installation.<\/div>\n<h2>Step 4: Importing data<\/h2>\n<h3>Database<\/h3>\n<h4>How to check the current port number<\/h4>\n<p>To ensure successful data import, you will need to specify the port used for.connecting to the database. The <code>5444<\/code> port is used by default.<\/p>\n<p>Since the port could be changed at some point in the past (e.g., the port could be set to <code>5433<\/code> after updating TrueConf Server from versions earlier that 5.2.9), run this command in the terminal to check the current port number:<\/p>\n<pre class=\"lang:default decode:true \">grep port \/opt\/trueconf\/server\/etc\/database\/postgresql.conf<\/pre>\n<h4>Import<\/h4>\n<p>Disable TrueConf services and restart the database service to close all active connections:<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl stop trueconf-web\r\nsudo systemctl stop trueconf-manager\r\nsudo systemctl restart trueconf-db<\/pre>\n<p>Later, to import the database, you will need to complete the following steps:<\/p>\n<ol>\n<li aria-level=\"1\">Open the terminal (if it was previously closed).<\/li>\n<li aria-level=\"1\">Copy the exported file to the directory with the database:\n<pre class=\"lang:default decode:true\">sudo cp \/home\/$USER\/server_backup\/tcs.dump \/opt\/trueconf\/server\/bin\/database<\/pre>\n<\/li>\n<li aria-level=\"1\">Sign in as the <b>postgres<\/b> user:\n<pre class=\"lang:default decode:true\">sudo su postgres<\/pre>\n<\/li>\n<li aria-level=\"1\">Go to the database directory:\n<pre class=\"lang:default decode:true\">cd \/opt\/trueconf\/server\/bin\/database<\/pre>\n<\/li>\n<li aria-level=\"1\">Run the import command and specify the <a href=\"#Database\">current port<\/a>:\n<pre class=\"lang:default decode:true\">.\/psql -p 5444 -f tcs.dump<\/pre>\n<div class=\"marked_note marked_note--warning\">The data import may take much time, if a large number of chats is stored on the server.<\/div>\n<\/li>\n<li aria-level=\"1\">Sign out of the <b>postgres<\/b> user account by running this command:\n<pre class=\"lang:default decode:true \">exit<\/pre>\n<\/li>\n<\/ol>\n<p>When all the data is imported, restart the following TrueConf Server services by running these commands consecutively:<\/p>\n<pre class=\"lang:default decode:true \">sudo systemctl restart trueconf-db\r\nsudo systemctl start trueconf-manager\r\nsudo systemctl start trueconf-web<\/pre>\n<h3>HTTPS settings<\/h3>\n<ol>\n<li aria-level=\"1\">Copy <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/migrating-trueconf-server-for-linux.html#Saving_the_SSL_key_and_certificate\" target=\"_blank\" rel=\"noopener\">the folder<\/a> with the ssl key and certificate to this directory <code>\/opt\/trueconf\/server\/etc\/webmanager\/ssl<\/code>.<\/li>\n<li aria-level=\"1\">Go to the <a href=\"https:\/\/trueconf.com\/blog\/wiki\/trueconf-server-control-panel\" target=\"_blank\" rel=\"noopener\">TrueConf Server control panel<\/a>.<\/li>\n<li aria-level=\"1\">In the <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/web-config\/#https\" target=\"_blank\" rel=\"noopener\"><b>Web \u2192 HTTPS<\/b><\/a> section, apply the same settings for the key and certificate.<\/li>\n<\/ol>\n<h3>Additional data<\/h3>\n<p>Copy other data <a href=\"https:\/\/trueconf.com\/blog\/knowledge-base\/migrating-trueconf-server-for-linux.html#Step_1_Save_information_about_the_server\" target=\"_blank\" rel=\"noopener\">saved in Step 1<\/a> to the corresponding directories:<\/p>\n<ul>\n<li aria-level=\"1\">Calls and conference recordings \u2014 to the <code>recordings<\/code> directory of the working directory (set by default)<\/li>\n<li aria-level=\"1\">Chat files \u2014 to the <code>files<\/code> directory in the working folder (set by default)<\/li>\n<li aria-level=\"1\">Logs \u2014 to the <code>\/opt\/trueconf\/server\/var\/log<\/code> directory<\/li>\n<li aria-level=\"1\">User avatars \u2014 to the avatars directory in the working folder.<\/li>\n<\/ul>\n<p>When all the settings are transferred, restart TrueConf Server:<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl start trueconf-manager\r\nsudo systemctl start trueconf-web<\/pre>\n<h2>Step 5. Testing data migration<\/h2>\n<p>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.<\/p>\n<p>If all the data was successfully imported, please contact the technical support to reset the hardware key (<b>HW key<\/b>) to which your license is bound. TrueConf technical support will reset the hardware key <b>for free<\/b>. You will need to submit <a href=\"https:\/\/trueconf.com\/support.html\" target=\"_blank\" rel=\"noopener\">a ticket<\/a> and specify the <a href=\"https:\/\/trueconf.com\/blog\/wiki\/server-id\" target=\"_blank\" rel=\"noopener\">ID of your server<\/a>. When the technical support resets the hardware key, please <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/server-part\/#registration-process\" target=\"_blank\" rel=\"noopener\">register the server again<\/a>.<\/p>\n<div class=\"marked_note marked_note--danger\">Important! Do not change the public <b>server name<\/b> 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.<\/div>\n<p>Happy video conferencing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, it may be necessary to migrate TrueConf Server to a different virtual machine or computer. This also includes the cases when a Linux-based OS is used.<\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[260],"tags":[191],"class_list":["post-21730","post","type-post","status-publish","format-standard","hentry","category-knowledge-base","tag-deployment","wpautop"],"_links":{"self":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/21730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/comments?post=21730"}],"version-history":[{"count":13,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/21730\/revisions"}],"predecessor-version":[{"id":26275,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/21730\/revisions\/26275"}],"wp:attachment":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/media?parent=21730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/categories?post=21730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/tags?post=21730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}