Template:VALT Server Migration: Difference between revisions

From IVS Wiki
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
#:  <code>crontab -e</code>
#:  <code>crontab -e</code>
#: - Press {{Keyboard | key = 1}} to continue
#: - Press {{Keyboard | key = 1}} to continue
</div><br>
</div>
 
: {{img | file = Edit_Cronjobs_Command.png}}<br>
: {{img | file = Edit_Cronjobs_Command.png}}<br>
<br>
 
<div class="section">
<div class="section">
<ol start="3">
<ol start="3">
Line 21: Line 22:
<li>Press {{Keyboard | key = Y}} to save</li>
<li>Press {{Keyboard | key = Y}} to save</li>
</ol>
</ol>
</div><br>
</div>
 
:{{img | file = Disable_Restart_Wowza_Cronjob.png}}<br>
:{{img | file = Disable_Restart_Wowza_Cronjob.png}}<br>
<br>
 
<div class="section">
<div class="section">
<ol start="6">
<ol start="6">
Line 32: Line 34:
<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 = VALT_Migration_MySQLdump.png}}<br>
: {{img | file = VALT_Migration_MySQLdump.png}}<br>
<br>
 
<div class="section">
<div class="section">
<ol start="9">
<ol start="9">
Line 41: Line 44:
<li>Enter password for '''ivsadmin''' and press {{Keyboard | key = Enter}}:</li>
<li>Enter password for '''ivsadmin''' and press {{Keyboard | key = Enter}}:</li>
</ol>
</ol>
</div><br>
</div>
: {{img | file = SCP_MySQLdump.png}}
: {{img | file = SCP_MySQLdump.png}}



Revision as of 21:01, 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

  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

  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:

  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:

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:



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


:


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


:


  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:




  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:



  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:


  1. The video files will begin copying over to the new server and will look like this:




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:



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.