Difference between revisions of "Template:VALT Server Migration"

From IVS Wiki
Jump to: navigation, search
(On the Old Server)
(On the New Server)
Line 46: Line 46:
  
 
=On the New Server=
 
=On the New Server=
# Type in the following, then press Enter: <pre>mysql -uivsadmin -p valt</pre>
+
 
# Type in the password to MySQL.
+
<div class="section">
#:{{img | file = MySQL_Login.png}}
+
# Type in the following and press {{Keyboard | key = Enter}}:
# Type: <pre>DROP database valt;</pre>
+
#: <code>mysql -uivsadmin -p valt</code>
#:{{img | file = Database_DROP.png}}
+
# Enter in the MySQL password and press {{Keyboard | key = Enter}}:
# Type:<pre>CREATE database valt;</pre>
+
</div><br>
#:{{img | file = Database_CREATE.png}}
+
: {{img | file = MySQL_Login.png}}
# Type in the following, then press Enter: <pre>exit </pre>
+
<br>
# Type in the following, then press Enter: <pre>mysql -uivsadmin -p valt < valt.sql</pre>
+
<div class="section">
# Enter the password for MySQL.
+
<ol start="3">
#: {{img | file = Database_IMPORT.png}}
+
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
# Type in the following, then press Enter: <pre>mysql -uivsadmin -p valt -e "UPDATE wowza SET address = 'NewServerIP'"</pre>
+
<code>DROP database valt;</code><br>
# Enter the password for MySQL.
+
</ol>
#: {{img | file = MySQL_Wowza_Update_Address.png}}
+
</div><br>
 +
: :{{img | file = Database_DROP.png}}
 +
<br>
 +
<div class="section">
 +
<ol start="4">
 +
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
 +
<code>CREATE database valt;</code><br>
 +
</ol>
 +
</div><br>
 +
: :{{img | file = Database_CREATE.png}}
 +
<br>
 +
<div class="section">
 +
<ol start="5">
 +
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
 +
<code>exit</code><br>
 +
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
 +
<code>mysql -uivsadmin -p valt < valt.sql</code><br>
 +
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 +
</ol>
 +
</div><br>
 +
: {{img | file = Database_IMPORT.png}}
 +
<br>
 +
<div class="section">
 +
<ol start="8">
 +
<li>Type in the following and press {{Keyboard | key = Enter}}:</li>
 +
<code>mysql -uivsadmin -p valt -e "UPDATE wowza SET address = '<b>NewServerIP</b>'"</code><br>
 +
<li>Enter in the MySQL password and press {{Keyboard | key = Enter}}:</li>
 +
</ol>
 +
</div><br>
 +
: {{img | file = MySQL_Wowza_Update_Address.png}}
  
 
=Copy the Recordings Folder to the New Server=
 
=Copy the Recordings Folder to the New Server=
 
{{:Copy the Recordings Folder to a New Server}}
 
{{:Copy the Recordings Folder to a New Server}}

Revision as of 07:55, 3 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

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 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

Copy the Recordings Folder to the New Server

Copy the Recordings Folder to a New Server