Difference between revisions of "Template:VALT Server Migration"
IVSWikiBlue (talk | contribs) |
IVSWikiBlue (talk | contribs) (→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> | |
− | + | <div class="section"> | |
− | + | <ol start="3"> | |
− | + | <li>Comment out the following job:</li> | |
− | + | <code>0 3 * * * /usr/local/valt/bin/restartwowza</code><br> | |
− | + | <li>Press {{Keyboard | key = CTRL}} + {{Keyboard | key = X}} to exit</li> | |
− | + | <li>Press {{Keyboard | key = Y}} to save</li> | |
− | + | </ol> | |
− | + | </div><br> | |
− | + | :{{img | file = Disable_Restart_Wowza_Cronjob.png}}<br> | |
− | + | <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
- Disable the Apache web service on the server to prevent further recordings:
-
sudo service apache2 stop
-
- Disable the restart Wowza cronjob:
- - Type in the following command:
-
crontab -e
- - Press 1 to continue
- Comment out the following job:
- Press CTRL + X to exit
- Press Y to save
0 3 * * * /usr/local/valt/bin/restartwowza
- Type in the following, then press Enter:
- Type in the following, then press Enter:
- Enter in the mysql password
sudo chmod 777 -R /usr/local/WowzaStreamingEngine/content/
mysqldump -uivsadmin -p valt
- Copy over the database file to the new server
- Enter password for ivsadmin
scp valt.sql ivsadmin@NewServerIP:/home/ivsadmin/
On the New Server
- Type in the following, then press Enter:
mysql -uivsadmin -p valt
- Type in the password to MySQL.
- Type:
DROP database valt;
- Type:
CREATE database valt;
- Type in the following, then press Enter:
exit
- Type in the following, then press Enter:
mysql -uivsadmin -p valt < valt.sql
- Enter the password for MySQL.
- Type in the following, then press Enter:
mysql -uivsadmin -p valt -e "UPDATE wowza SET address = 'NewServerIP'"
- Enter the password for MySQL.