Centova Technologies Inc.

Products and Services

Centova Cast
Customer Support
Centova Technologies
 

Navigation

NOTE: This article is for Centova Cast v2 only; an alternate version exists for Centova Cast v3.

Knowledge Base | Centova Cast v2 | Information

Migrating a Centova Cast v2 installation to another server

Question:

How can I migrate my Centova Cast v2 installation to another server?

Answer:

Migrating a Centova Cast v2 installation is a very advanced procedure which should only be performed by qualified systems administrators. Be sure to backup your data carefully in advance.

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:

  1. Login to your client account at centova.com. Click Manage Product Licenses, then click on your Centova Cast license. Then, click the Re-issue license link.

  2. Install Centova Cast on Server B. Important: Be sure to install the same version of Centova Cast that you are using on Server A. You may want to upgrade Server A to the latest version before performing the migration.

    Be sure to install it exactly as you did on Server A (using the same paths and so-on, and configuring it to use the same server/source software) otherwise your migrated configuration data will not work.

  3. Backup your Centova Cast database on Server A. You can do this using the mysqldump command via SSH, or using a web-based tool such as phpMyAdmin.

    For example:

    mysqldump -uroot -p CAST_DB_NAME > cast_db_backup.sql
    
  4. Backup the /home/centovacast/vhosts/ directory on Server A, maintaining file/directory permissions (i.e., using tar or rsync for the backup).

    For example:

    cd /home/centovacast/vhosts
    tar czvf /cast_backup.tar.gz *
    
  5. On Server B, restore the database backup you made in step 2. You can do this using the mysql command via SSH, or using a web-based tool such as phpMyAdmin.

    For example:

    cat cast_db_backup.sql | mysql -uroot -p CAST_DB_NAME
    
  6. On Server B, restore the file backup you made in step 3, maintaining file/directory permissions. For example:

    cd /home/centovacast/vhosts
    tar xzvf /cast_backup.tar.gz
    
  7. Update ownership of your virtual hosts by running:

    chown -R centovacast.centovacast /home/centovacast/vhosts
    
  8. Update the Centova Cast UID/GID in your Centova Cast database on Server B. You can do this using the mysql command via SSH, or using a web-based tool such as phpMyAdmin.

    To determine the new UID/GID of the 'centovacast' account, run this command on Server B:

    id centovacast
    

    This will display something like:

    uid=1009(centovacast) gid=1010(centovacast) groups=1010(centovacast)
    

    In this case, your Centova Cast UID would be 1009, and your Centova Cast GID would be 1010.

    Next, update the ccuid and ccgid fields in the settings table in the Centova Cast database on Server B. For example, if your UID is 1009 and your GID is 1010, you might use this query:

    UPDATE settings SET ccuid='1009',ccgid='1010';
    
  9. 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.

    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 5 (above) run:

    cat cast_db_backup.sql | sed 's/oldip/newip/g' > cast_db_backup.sql.new
    

    Then import cast_db_backup.sql.new into your new database on server B. You'll also need to change the SHOUTcast configuration files on disk. After step 6 (above), run:

    find /home/centovacast/vhosts -name "*.conf" | 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.