Difference between revisions of "Template:VALT Server Migration"

From IVS Wiki
Jump to: navigation, search
(On the Old Server)
Line 53: Line 53:
 
#: <code>mysql -uivsadmin -p valt</code>
 
#: <code>mysql -uivsadmin -p valt</code>
 
# Enter in the MySQL password and press {{Keyboard | key = Enter}}:
 
# Enter in the MySQL password and press {{Keyboard | key = Enter}}:
</div><br>
+
</div>
 
: {{img | file = MySQL_Login.png}}
 
: {{img | file = MySQL_Login.png}}
<br>
+
 
 
<div class="section">
 
<div class="section">
 
<ol start="3">
 
<ol start="3">
Line 61: Line 61:
 
<code>DROP database valt;</code><br>
 
<code>DROP database valt;</code><br>
 
</ol>
 
</ol>
</div><br>
+
</div>
 +
 
 
: :{{img | file = Database_DROP.png}}
 
: :{{img | file = Database_DROP.png}}
<br>
+
 
 
<div class="section">
 
<div class="section">
 
<ol start="4">
 
<ol start="4">
 
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
 
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
<code>CREATE database valt;</code><br>
+
<code>CREATE database valt;</code>
 
</ol>
 
</ol>
</div><br>
+
</div>
 +
 
 
: :{{img | file = Database_CREATE.png}}
 
: :{{img | file = Database_CREATE.png}}
<br>
+
 
 
<div class="section">
 
<div class="section">
 
<ol start="5">
 
<ol start="5">
Line 80: Line 82:
 
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 
</ol>
 
</ol>
</div><br>
+
</div>
 +
 
 
: {{img | file = Database_IMPORT.png}}<br>
 
: {{img | file = Database_IMPORT.png}}<br>
<br>
+
 
 
<div class="section">
 
<div class="section">
 
<ol start="8">
 
<ol start="8">
Line 89: Line 92:
 
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 
</ol>
 
</ol>
</div><br>
+
</div>
 +
 
 
: {{img | file = MySQL_Wowza_Update_Address.png}}
 
: {{img | file = MySQL_Wowza_Update_Address.png}}
<br>
+
 
 
<div class="section">
 
<div class="section">
 
<ol start="10">
 
<ol start="10">
Line 99: Line 103:
 
<li>Type in the <b>ivsadmin</b> password and press {{Keyboard | key = Enter}}:</li>
 
<li>Type in the <b>ivsadmin</b> password and press {{Keyboard | key = Enter}}:</li>
 
</ol>
 
</ol>
</div><br>
+
</div>
 +
 
 
: {{img | file = Rsync_Recordings.png}}
 
: {{img | file = Rsync_Recordings.png}}
  
Line 106: Line 111:
 
<li>The video files will begin copying over to the new server and will look like this:</li>
 
<li>The video files will begin copying over to the new server and will look like this:</li>
 
</ol>
 
</ol>
</div><br>
+
</div>
: {{img | file = Video_Copy 1.PNG | width = }}<br>
 
  
: {{img | file = Video_Copy 2.PNG | width = }}<br>
+
: {{img | file = Video_Copy 1.PNG | width = }}
 +
 
 +
: {{img | file = Video_Copy 2.PNG | width = }}
  
 
<div class="floating_card">
 
<div class="floating_card">
Line 117: Line 123:
 
<li>Assuming the copy is running at a full 1GB link, it will take about 2.8 hours per 1 TB of data</li>
 
<li>Assuming the copy is running at a full 1GB link, it will take about 2.8 hours per 1 TB of data</li>
 
</ul>
 
</ul>
</div><br>
+
</div>
  
 
<div class="section">
 
<div class="section">
Line 123: Line 129:
 
<li>After the video files are done copying over, you will see a confirmation message similar to the one below:</li>
 
<li>After the video files are done copying over, you will see a confirmation message similar to the one below:</li>
 
</ol>
 
</ol>
</div><br>
+
</div>
: {{ img | file = Rsync_Confirmation.png}}<br>
+
 
 +
: {{ img | file = Rsync_Confirmation.png}}
  
 
<div class="floating_card">After the files have been copied over, navigate to the VALT webpage on the new server and verify that all of the files are there.</div><br>
 
<div class="floating_card">After the files have been copied over, navigate to the VALT webpage on the new server and verify that all of the files are there.</div><br>
  
 
[[Category:rsync]]
 
[[Category:rsync]]

Revision as of 15:05, 5 August 2022

Note: Change IP's in the below commands to match the IP's of the new and old server

On the Old Server

  1. Disable the Apache web service to prevent further recordings:
    sudo service apache2 stop
  2. Disable the restart Wowza cronjob:
    - Type in the following command:
    crontab -e
    - Press 1 to continue
Edit Cronjobs Command.png
  1. Comment out the following job:
  2. 0 3 * * * /usr/local/valt/bin/restartwowza

  3. Press CTRL + X to exit
  4. Press Y to save
Disable Restart Wowza Cronjob.png
  1. Type in the following, then press Enter:
  2. sudo chmod 777 -R /usr/local/WowzaStreamingEngine/content/

  3. Type in the following, then press Enter:
  4. mysqldump -uivsadmin -p valt > valt.sql

  5. Enter in the MySQL password and press Enter:
VALT Migration MySQLdump.png
  1. Copy over the database file to the new server
  2. scp valt.sql ivsadmin@NewServerIP:/home/ivsadmin/

  3. Enter password for ivsadmin and press Enter:
SCP MySQLdump.png

On the New Server

  1. Type in the following and press Enter:
    mysql -uivsadmin -p valt
  2. Enter in the MySQL password and press Enter:
MySQL Login.png
  1. Type in the following and press Enter:
  2. DROP database valt;

 :Database DROP.png
  1. Type in the following and press Enter:
  2. CREATE database valt;

 :Database CREATE.png
  1. Type in the following and press Enter:
  2. exit

  3. Type in the following and press Enter:
  4. mysql -uivsadmin -p valt < valt.sql

  5. Enter in the MySQL password and press Enter:
Database IMPORT.png
  1. Type in the following and press Enter:
  2. mysql -uivsadmin -p valt -e "UPDATE wowza SET address = 'NewServerIP'"

  3. Enter in the MySQL password and press Enter:
MySQL Wowza Update Address.png
  1. Type in the following, then press Enter:
  2. sudo rsync -av --progress ivsadmin@OldServerIP:/usr/local/WowzaStreamingEngine/content/valt_recordings/* /usr/local/WowzaStreamingEngine/content/valt_recordings/
  3. When prompted, type yes to continue connecting to the server:
  4. Type in the ivsadmin password and press Enter:
Rsync Recordings.png
  1. The video files will begin copying over to the new server and will look like this:
Video Copy 1.PNG
Video Copy 2.PNG

Things to note:

  • Depending on the amount of video files, it may take some time for all of the files to transfer
  • Assuming the copy is running at a full 1GB link, it will take about 2.8 hours per 1 TB of data
  1. After the video files are done copying over, you will see a confirmation message similar to the one below:
Rsync Confirmation.png
After the files have been copied over, navigate to the VALT webpage on the new server and verify that all of the files are there.