Difference between revisions of "Template:VALT Server Migration"

From IVS Wiki
Jump to: navigation, search
(On the Old Server)
Line 7: Line 7:
 
<br>
 
<br>
 
<div class="section">
 
<div class="section">
# Disable the Apache web service on the server to prevent further recordings
+
# Disable the Apache web service on the server to prevent further recordings:
 
#: <code>sudo service apache2 stop</code>
 
#: <code>sudo service apache2 stop</code>
 
# Disable the restart Wowza cronjob:
 
# Disable the restart Wowza cronjob:
 
#: - Type in the following command:
 
#: - Type in the following command:
#: <code>crontab -e</code>
+
#:   <code>crontab -e</code>
 
#: - Press {{Keyboard | key = 1}} to continue
 
#: - Press {{Keyboard | key = 1}} to continue
</div>
+
</div><br>
 
+
: {{img | file = Edit_Cronjobs_Command.png}}<br>
 
+
<br>
#:{{img | file = Edit_Cronjobs_Command.png}}<br>
+
<div class="section">
#:<br> - Comment out the following job: <div class="floating_card"><pre>0 3 * * * /usr/local/valt/bin/restartwowza</pre></div><br>
+
<ol start="3">
#:{{img | file = Disable_Restart_Wowza_Cronjob.png}}
+
<li>Comment out the following job:</li>
# Type in the following, then press {{Keyboard | key = Enter}} Enter: <div class="floating_card"><pre>sudo chmod 777 -R /usr/local/WowzaStreamingEngine/content/</pre></div><br>
+
<code>0 3 * * * /usr/local/valt/bin/restartwowza</code><br>
# Type in the following, then press {{Keyboard | key = Enter}} Enter: <div class="floating_card"><pre>mysqldump -uivsadmin -p valt</pre></div><br>
+
<li>Press {{Keyboard | key = CTRL}} + {{Keyboard | key = X}} to exit</li>
#Enter in the mysql password
+
<li>Press {{Keyboard | key = Y}} to save</li>
#:{{img | file = VALT_Migration_MySQLdump.png}}
+
</ol>
# Type in the following, then press Enter: <div class="floating_card"><pre>scp valt.sql ivsadmin@NewServerIP:/home/ivsadmin/</pre></div><br>
+
</div><br>
# Enter password for '''ivsadmin'''.
+
:{{img | file = Disable_Restart_Wowza_Cronjob.png}}<br>
#:{{img | file = SCP_MySQLdump.png}}
+
<br>
 +
<div class="section">
 +
<ol start="6">
 +
<li>Type in the following, then press {{Keyboard | key = Enter}}:</li>
 +
<code>sudo chmod 777 -R /usr/local/WowzaStreamingEngine/content/</code>
 +
<li>Type in the following, then press {{Keyboard | key = Enter}}:</li>
 +
<code>mysqldump -uivsadmin -p valt</code>
 +
<li>Enter in the mysql password</li>
 +
</ol>
 +
</div><br>
 +
: {{img | file = VALT_Migration_MySQLdump.png}}<br>
 +
<br>
 +
<div class="section">
 +
<ol start="9">
 +
<li>Copy over the database file to the new server</li>
 +
<code>scp valt.sql ivsadmin@'''NewServerIP''':/home/ivsadmin/</code>
 +
<li>Enter password for '''ivsadmin'''</li>
 +
</ol>
 +
</div><br>
 +
: {{img | file = SCP_MySQLdump.png}}
  
 
=On the New Server=
 
=On the New Server=

Revision as of 15:43, 2 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

Note: It is beneficial to stop the apache service on the old server to prevent further recording of videos on it


  1. Disable the Apache web service on the server 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

  5. Enter in the mysql password

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

SCP MySQLdump.png

On the New Server

  1. Type in the following, then press Enter:
    mysql -uivsadmin -p valt
  2. Type in the password to MySQL.
    MySQL Login.png
  3. Type:
    DROP database valt;
    Database DROP.png
  4. Type:
    CREATE database valt;
    Database CREATE.png
  5. Type in the following, then press Enter:
    exit 
  6. Type in the following, then press Enter:
    mysql -uivsadmin -p valt < valt.sql
  7. Enter the password for MySQL.
    Database IMPORT.png
  8. Type in the following, then press Enter:
    mysql -uivsadmin -p valt -e "UPDATE wowza SET address = 'NewServerIP'"
  9. Enter the password for MySQL.
    MySQL Wowza Update Address.png

Copy the Recordings Folder to the New Server

Copy the Recordings Folder to a New Server