Knowledge Base | Centova Cast v3 | Information
Migrating a Centova Cast v3 installation to another server
How can I migrate my Centova Cast v3 installation to another server?
Migrating a Centova Cast v3 installation is a very advanced procedure which should only be performed by qualified systems administrators. Be sure to backup your data carefully in advance.
Note that this article is for migrating full Centova Cast installations only, including the web interface. If you are migrating a control (slave) server which is controlled by a separate web interface server, refer to this article instead.
DO NOT decommission your old server, or update DNS to point to your new server, until you have successfully performed the migration and verified that the streams are working on the new server.
To migrate a Centova Cast installation from Server A to Server B:
Update server A to the latest Centova Cast version.
Login to your client account at centova.com. Click
Manage Product Licenses, then click on your Centova Cast license. Then, click the
Re-issue licenselink. At this point, Server A will be left without a valid license, but will continue to work normally for at least 7 more days.
Install Centova Cast on Server B per the installation manual.
Be sure to install it exactly as you did on Server A, including the same streaming server and autoDJ software and any configuration file modifications you may have made.
Stop Centova Cast on server A:
Stop Centova Cast on server B:
Backup your Centova Cast database on Server A. You can do this using the
mysqldumpcommand via SSH, or using a web-based tool such as phpMyAdmin.
mysqldump -uroot -p CAST_DB_NAME > cast_db_backup.sql
/usr/local/centovacast/var/vhosts/directory on Server A. By far the fastest and most efficient way to do this is to use
rsyncto send it directly to server B. For example:
rsync -avze ssh /usr/local/centovacast/var/vhosts/ serverb.example.com:/usr/local/centovacast/var/vhosts/
serverb.example.comwith the hostname or IP address of server B.
If rsync is not available for some reason, you can alternately create a tarball of the
vhosts/directory on server A, manually copy it to server B, and extract it on server B.
For example, on server A:
cd /usr/local/centovacast/var/vhosts tar czvf /cast_backup.tar.gz *
Then copy the tarball to server B, and run:
cd /usr/local/centovacast/var/vhosts tar xzvf /cast_backup.tar.gz
On Server B, restore the database backup you made in step 6. You can do this using the
mysqlcommand via SSH, or using a web-based tool such as phpMyAdmin.
cat cast_db_backup.sql | mysql -uroot -p CAST_DB_NAME
On server B, update your filesystem permissions and ownerships by running:
Start Centova Cast on server B:
Log in as 'admin' in your Centova Cast panel on server B, and under the Management->Hosts section edit the settings for this server (usually Local Server) and replace the Authentication Key with the key returned by the following command:
If your IP address(es) on your new server are different from your old server's IP address(es), login to Centova Cast on server B and update each stream with the new IP address.
Also make any IP address or hostname changes that may be necessary under
Tip (advanced users only): IP address changes can be automated using shell scripting if desired. To change the IP addresses in the database, prior to step 8 (above) run:
cat cast_db_backup.sql | sed 's/oldip/newip/g' > cast_db_backup.sql.new
cast_db_backup.sql.newinto your new database on server B. You'll also need to change the IP addresses in all configuration files on disk. After step 7 (above), run:
find /usr/local/centovacast/var/vhosts -name '*.conf' -o -name 'settings.liq' | xargs sed -i -e 's/oldip/newip/g'
At this point, you should have a working Centova Cast installation on Server B. Login to Server B and test your streams to make sure that they are working.