Before you begin

This blog explains how to Migrate Centova Cast v3 Installation to a new server. Here we explain the situation using two servers as SERVER A and SERVER B. Before starting the migration we should make sure that both servers have the latest centovacast version using the below command.: The migration is not a very complex task if you are not experienced in command line we can help you to do the migration with our Server Migration Service
/usr/local/centovacast/sbin/update
The primary step of the migration is to stop Centova Cast service on both servers using the below command.
Stop Centova Cast on server A and Server B using the below command:
/usr/local/centovacast/centovacast stop
Then the next step is to backup your Centova Cast database on server A using mysqldump. Please find the command below to take the dump.
mysqldump -u root -p CAST_DB_NAME > cast_db_backup.sql
Please note that you will get the DB config file details from the below config file.
/usr/local/centovacast/etc/centovacast.conf
Then rsync the “/usr/local/centovacast/var/vhosts/” to server B using below command.Please make sure that you have updated with the IP address of the destination server in the command.
rsync -avze ssh /usr/local/centovacast/var/vhosts/ serverB:/usr/local/centovacast/var/vhosts
Steps
After successful transfering of files then we need to restore the mysql dump. Please find the below command to restore the backup.
mysql -u root -p CAST_DB_NAME < cast_db_backup.sql
Server B needs to fix file permissions and ownerships of files and folders using below command.
/usr/local/centovacast/sbin/fixperms
Next step is to change the IP address in the database. Please find the below command to replace old IP with new server IP.
cat cast_db_backup.sql | sed 's/oldip/newip/g' > cast_db_backup.sql.new
Then import cast_db_backup.sql.new to the database on server B.
Then I need to replace the old ip with new Ip in all config files using the below command.
find /usr/local/centovacast/var/vhosts -name '*.conf' -o -name 'settings.liq' | xargs sed -i -e 's/oldip/newip/g'
Then Start Centova Cast on server B using the below command.
/usr/local/centovacast/centovacast start
After all successful installations browse IP:2199 to access the centova cast login page and check and confirm that everything works properly.
For regular server management checkout our server management service plans.
Want an engineer to manage the server behind this problem?
iServerSupport provides monitoring, maintenance, security, and incident response for infrastructure you already control.



