{"id":21881,"date":"2023-11-02T13:00:20","date_gmt":"2023-11-02T10:00:20","guid":{"rendered":"https:\/\/trueconf.com/blog\/?p=21881"},"modified":"2023-11-02T14:55:31","modified_gmt":"2023-11-02T11:55:31","slug":"how-to-export-trueconf-server-data-from-linux-to-windows","status":"publish","type":"post","link":"https:\/\/trueconf.com/blog\/knowledge-base\/how-to-export-trueconf-server-data-from-linux-to-windows","title":{"rendered":"How to export TrueConf Server data from Linux to Windows"},"content":{"rendered":"<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows.png\" data-rel=\"lightbox-gallery-7SW6pCjG\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-21884\" src=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows.png\" alt=\"\" width=\"1200\" height=\"600\" loading=\"lazy\" title=\"\" srcset=\"https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows.png 1200w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows-690x345.png 690w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows-1024x512.png 1024w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows-768x384.png 768w, https:\/\/trueconf.com/blog\/wp-content\/uploads\/2022\/10\/linux-to-windows-404x202.png 404w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p><!--more--><\/p>\n<div class=\"marked_note marked_note--danger\"><b>Important!<\/b> 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<h2>Step 1. TrueConf Server update<\/h2>\n<p>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 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<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<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, search by content and specify <a href=\"https:\/\/trueconf.com\/blog\/wiki\/server-id\" target=\"_blank\" rel=\"noopener\">Server ID<\/a> 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 than 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>Open the terminal (if it was previously closed).<\/li>\n<li>Sign in as the <b>postgres<\/b> user:\n<pre class=\"lang:default decode:true\">sudo su postgres<\/pre>\n<\/li>\n<li>Go to the database directory:\n<pre class=\"lang:default decode:true\">cd \/opt\/trueconf\/server\/bin\/database<\/pre>\n<\/li>\n<li>Run the following command and specify the <a href=\"#How_to_check_the_current_port_number\">current port<\/a>:\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>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>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\/backups<\/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\/backups<\/pre>\n<h4>Registry<\/h4>\n<p>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.<\/p>\n<p>To export these settings run this command in the terminal:<\/p>\n<pre class=\"lang:default decode:true \">sudo \/opt\/trueconf\/server\/bin\/vcs\/tc_regkey export \"\" \/home\/$USER\/backups\/registry.csv<\/pre>\n<p>To 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:<\/p>\n<pre class=\"lang:default decode:true \">sed -i '\/Configuration,Working Directory\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,Executable Path\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,Recordings Path\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,Ffmpeg Path\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,Push Script\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,File Storage Path\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,version\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration,DB Connection String\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Configuration\\\\ConfDefault,Working Directory\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager,server_dir\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager,db_port\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager,group_security\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager,group_admin\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager,client_path\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/Transceivers\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager\\\\API\\\\AccessTokens\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i '\/WebManager\\\\API\\\\RefreshTokens\\\\\/d' \/home\/$USER\/backups\/registry.csv\r\nsed -i 's\/ffmpeg\\.exe\/\\\/opt\\\/trueconf\\\/server\\\/bin\\\/ffmpeg\\\/ffmpeg\\\/\/' \/home\/$USER\/backups\/registry.csv<\/pre>\n<p>If the new server has a different IP address, execute the following command in the terminal:<\/p>\n<pre class=\"lang:default decode:true \">sed -i \"s\/x\\.x\\.x\\.x\/y.y.y.y\/\" \/home\/$USER\/backups\/registry.csv<\/pre>\n<p>where:<br \/>\n<code>x\\.x\\.x\\.x<\/code> is the previous IP address with dots (.) escaped, for example, <code>192\\.168\\.0\\.1<\/code>.<br \/>\n<code>y.y.y.y<\/code> is the new IP address where dots are not escaped, for example: <code>192.168.1.1<\/code>.<\/p>\n<h4>HTTPS settings<\/h4>\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>Save the backup copy of this directory:<\/p>\n<pre class=\"lang:default decode:true \">sudo cp -R \/opt\/trueconf\/server\/etc\/webmanager\/ssl \/home\/$USER\/backups<\/pre>\n<h3>Additional data<\/h3>\n<h4>Conference and call recordings<\/h4>\n<p>If conferences or calls are <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/web-config#recording-tab\" target=\"_blank\" rel=\"noopener\">automatically recorded<\/a> 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 <b>Path<\/b> field in the <b>Recordings<\/b> section of the TrueConf Server 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-7SW6pCjG\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full 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=\"1124\" height=\"350\" 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: 1124px) 100vw, 1124px\" \/><\/a><\/p>\n<p>If you need to move them to a new server, just copy necessary recordings.<\/p>\n<pre class=\"lang:default decode:true \">sudo cp -R \/opt\/trueconf\/server\/var\/lib\/recordings \/home\/$USER\/backups<\/pre>\n<h4>Chat files<\/h4>\n<p>All chat files shared by the users of your server are saved in the <code>files<\/code> folder in the TrueConf Server working directory by default. To find their exact location, check the <b>Path<\/b> field in the <b>File Storage<\/b> section of the TrueConf Server 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-7SW6pCjG\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full 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=\"966\" height=\"357\" 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: 966px) 100vw, 966px\" \/><\/a><\/p>\n<p>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:<\/p>\n<pre class=\"lang:default decode:true \">sudo cp -R \/opt\/trueconf\/server\/var\/lib\/files \/home\/$USER\/backups<\/pre>\n<h4>Log files<\/h4>\n<p>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).<br \/>\nThe 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:<\/p>\n<pre class=\"lang:default decode:true\">sudo cp -R \/opt\/trueconf\/server\/var\/log \/home\/$USER\/backups<\/pre>\n<h4>User avatars<\/h4>\n<p>Avatars of the users registered on your TrueConf Server instance are stored in the <code>avatars<\/code> folder in the TrueConf Server working directory. Copy this directory to a convenient location on your server.<\/p>\n<p>By default, it is located at the path <code>\/opt\/trueconf\/server\/var\/lib<\/code>; however, you can check the location in the <strong>Control panel \u2192 Settings section<\/strong> (<strong>Working path<\/strong> block).<\/p>\n<p><a href=\"https:\/\/trueconf.com\/blog\/wp-content\/uploads\/2022\/08\/linux-work-path-en.png\" data-rel=\"lightbox-gallery-7SW6pCjG\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"aligncenter size-full 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=\"983\" height=\"148\" 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: 983px) 100vw, 983px\" \/><\/a><\/p>\n<p>Copy the directory with this command:<\/p>\n<pre class=\"lang:default decode:true \">sudo cp -R \/opt\/trueconf\/server\/var\/lib \/home\/$USER\/backups<\/pre>\n<h2>Step 3. TrueConf Server installation<\/h2>\n<p>Check <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 how TrueConf Server can be installed from a file and repository.<\/p>\n<div class=\"marked_note marked_note--danger\"><b>Do not<\/b> register TrueConf Server after installation.<\/div>\n<h2>Step 4. Importing date on Windows<\/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>5432<\/code> after updating TrueConf Server from versions earlier than 5.2.9), run this command in the terminal to check the current port number:<\/p>\n<pre class=\"lang:default decode:true \">findstr port \"C:\\Program Files\\TrueConf Server\\database\\conf\\postgresql.conf\"<\/pre>\n<h4>Import<\/h4>\n<p>Disable TrueConf services and restart the database service to close all active connections. For this purpose, run these commands as the administrator:<\/p>\n<pre class=\"lang:default decode:true \">sc stop \"TrueConf Web Manager\"\r\nsc stop trueconf-manager\r\nsc stop \"TrueConf Database\" &amp;&amp; sc start \"TrueConf Database\"<\/pre>\n<p>Next, run the following command to import data:<\/p>\n<pre class=\"lang:default decode:true \">\"C:\\Program Files\\TrueConf Server\\database\\bin\\psql.exe\" -p 5444 -U postgres -d postgres -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<h3>Registry<\/h3>\n<p>To import the registry, run this command:<\/p>\n<pre class=\"lang:default decode:true \">\"C:\\Program Files\\TrueConf Server\\tc_regkey.exe\" import \"\" registry.csv<\/pre>\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 \">sc stop \"TrueConf Database\" &amp;&amp; sc start \"TrueConf Database\"\r\nsc start \"TrueConf Web Manager\"\r\nsc start trueconf-manager<\/pre>\n<h3>HTTPS settings<\/h3>\n<ol>\n<li>Copy the <a href=\"#HTTPS_settings\">exported folder<\/a> with the SSL key and certificate to this directory<br \/>\n<code>[installation_path]\\httpconf\\ssl<\/code>, where <code>[installation_path]<\/code> \u2013 the server installation path.<\/li>\n<li>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>In the <a href=\"https:\/\/docs.trueconf.com\/server\/en\/admin\/web-config\/#https\" target=\"_blank\" rel=\"noopener\"><strong>Web \u2192 HTTPS<\/strong><\/a> section, apply the same key and certificate settings that were used on the previous instance of TrueConf Server.<\/li>\n<\/ol>\n<h3>Additional data<\/h3>\n<p>Copy other data saved in <a href=\"#Step_2_Server_data_export\">Step 2<\/a> to the corresponding directories of the new server:<\/p>\n<ul>\n<li>Calls and conference recordings \u2014 to the <code>Recordings<\/code> folder of the working directory (selected by default)<\/li>\n<li>Chat files \u2014 to the <code>files<\/code> folder in the working directory (selected by default)<\/li>\n<li>Logs \u2014 to the working directory<\/li>\n<li>User avatars \u2014 to the <code>avatars<\/code> directory in the working folder.<\/li>\n<\/ul>\n<p>When all the data are imported, restart the following TrueConf services by running a number of terminal commands consecutively as the administrator:<\/p>\n<pre class=\"lang:default decode:true \">sc stop \"TrueConf Web Manager\" &amp;&amp; sc start \"TrueConf Web Manager\"\r\nsc stop trueconf-manager &amp;&amp; sc start trueconf-manager<\/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 it, chat messages will not be displayed in client applications.<\/div>\n<p>Happy video conferencing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/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-21881","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\/21881","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=21881"}],"version-history":[{"count":9,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/21881\/revisions"}],"predecessor-version":[{"id":26303,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/posts\/21881\/revisions\/26303"}],"wp:attachment":[{"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/media?parent=21881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/categories?post=21881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trueconf.com/blog\/wp-json\/wp\/v2\/tags?post=21881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}