Migrating
This document contains information on migrating from one server to another.
A Note For Wowza Media Control Panels:
Make sure you press the "restart" button for every single Wowza Media Service after migrating.
Then restart Wowza Media Server at the end using "/etc/init.d/WowzaMediaSever restart"
Windows to Windows
Current Server
- Create a XAMPP Backup
Open Windows Explorer and right click on C:/xampp/ directory.
Select "Sent To -> Compressed Archive".
This will backup your files and database!
Move the compressed archive to C:/xampp/htdocs/mybackup.zip
New Server
On the new server, you need to treat the migrate as a "new installation" as such by installing and configuring all prerequisite software (AD, WMS, Icecast, Ices, Wowza etc).
- Install Prerequisite Software
- Install Google Chrome
- Install Wowza Media Server
- Install Windows Media Services
DO NOT CONFIGURE XAMPP OR MEDIA CONTROL PANEL.
- Download your xampp installation using Google Chrome or Firefox
We recommend not to use Internet Explorer as it can corrupt zip files containing GeoIP databases.
http://yourdomain.com:2000/mybackup.zip;
- Setup XAMPP
Extract xampp to C:/xampp/ so it is identical to your old server.
- Configure Scheduled Task
This is very important! It controls how your shoutcast/icecast services start and manages statistics.
Read the following Step 5 for Scheduled Task Configuration:
http://cast-control.net/mediacp/documentation/installation/windows-2003/#mediacp
- Reissue MediaCP License Key
Login to our client area (link at top of this page).
Select "View your licenses" and select "View and Download" your license.
You will now see a reissue button, press this.
- Configure Cast-Control
Login to cast-control on the new server and navigate to Administration -> Configuration.
You will need to modify the Cast-Control Path and Host Address to suit the new server.
Open the Plugins tab of the admin configuration page and update:
- WowzaDir
- windowsMediaServices Password
That should be it!
Linux to Linux
Current Server
- Create a database backup
# mysqldump -u root -p databaseName > mediacp.database.sql;
Note: If you are unaware of your database uesrname and password, check the mediacp database.php.
- Create a file backup
# cd /root/;
# tar -cvzf mediacp.files.tar.gz /path/to/mediacp;
- Move backup to web/public URL
# mv /root/mediacp.* /path/to/mediacp/
New Server
- Install MediaCP Prereq
Run the installation process from the Linux Quick Install documentation.
This will install prerequisite system packages, Icecast, Ices & Wowza Media Server as well as the cron job.
It will also configure your Wowza Media Server automatically for integration with Cast-Control MCP.
You should delete the mediacp files after the installation, this is so we can install the backed up files instead.
- Download database & file backups
# wget http://yourdomain.com/mediacp/mediacp.database.sql;
# wget http://yourdomain.com/mediacp/mediacp.files.tar.gz;
- Install the database
# mysql -u root -p -D newDatabaseName < mediacp.database.sql
- Install the files
# mv castcontrol.files.tar /home/newDomain/public_html/;
# cd /home/newDomain/public_html/;
# tar -xvvf castcontrol.files.tar;
- Update MediaCP database.php
You should make any database username, password, name or prefix changes to the database.php if using different details to the old installation.
- Reissue Cast-Control License
1. Simply login to the billing system at http://www.cast-control.net/billing/client_area.php
2. Select "View Your Licenses", Select "View and Download" on your license.
3. You will now see a button to "Reissue" your license.
- Configure Cast-Control
Login to cast-control on the new server and navigate to Administration -> Configuration.
You will need to modify the Cast-Control Path and Host Address to suit the new server.
Please Note, if the Panel URL is different to your old server or you have not updated the DNS you will need to update the database.php and add the following to the bottom of the file:
$setting['panel_url'] = 'http://your_new_url/mediacp/';
- Restart Wowza Services
If you are using Wowza Media Services in your control panel, you will now need to restart every single one of these using the "restart" button in the MediaCP.
If you are not, you should not need to worry.
Windows to Linux
Current Server
- Create a database backup
Login to PhpMyAdmin through remote desktop at http://localhost/phpmyadmin or http://localhost:2000/phpmyadmin
Export the database to .SQL and save this in C:/xampp/htdocs/mybackup.sql
- Create a file backup
The most important directory to backup is the ./content/ directory.
Right click on this and "Send to a compressed archive (.zip)".
Move this into C:/xampp/htdocs/mycontent.zip
New Server
On the new server, you need to treat the migrate as a "new installation" as such by installing and configuring all prerequisite software (Icecast, Ices, Wowza etc).
- Install MediaCP Prereq
Run the installation process from the Linux Quick Install documentation.
This will install prerequisite system packages, Icecast, Ices & Wowza Media Server.
It will also configure your Wowza Media Server automatically for integration with Cast-Control MCP.
- Download both files using wget
# wget http://yourdomain.com/mybackup.sql; wget http://yourdomain.com/mycontent.zip;
- Install the database
# mysqladmin -u root -p -D newDatabaseName < mybackup.sql
- Install the Content Files
Move the files to the MediaCP directory (eg /var/www/html/mediacp/)
# mv mycontent.zip /var/www/html/mediacp/mycontent.zip
# cd /var/www/html/mediacp/
# rm -rf ./content/
# unzip mycontent.zip
Make sure the ./content directory now exists and contains all your media files.
You will also need to give the directory recursive ownership and 777 permissions.
# chown -R myuser:mygroup ./content/
# chmod 777 -R ./content/
- Configure the database.php
You should make any database username, password, name or prefix changes to the database.php if using different details to the old installation.
- Reissue MediaCP License Key
Login to our client area (link at top of this page).
Select "View your licenses" and select "View and Download" your license.
You will now see a reissue button, press this.
- Configure Cast-Control
Login to cast-control on the new server and navigate to Administration -> Configuration.
You will need to modify the Cast-Control Path and Host Address to suit the new server.
That should be it!
Moving from one domain/directory to another (same server)
This guide will demonstrate moving the control panel to a new location on the same server.
- Move the MediaCP to the new directory
mv [InstallDir]/mediacp/ [NewDir]/mediacp/
You will also need to update the cron job in /etc/crontab:
nano /etc/crontab
- Update ownership/permissions
You may also need to change the ownership of the files and cron job.
If using cPanel, you shoudl chown the entire mediacp directory as the new user/group.
chown -R newuser:newgroup [NewDir]/mediacp/
Don't forget to update the cron job:
nano /etc/crontab
- Reissue MediaCP License
Login to your billing account at http://clients.cast-control.net/ and locate your license key.
Select from the main menu "Services -> My Services" than "View Details" next to your license.
Finally select "Management Actions" and "Reissue License".
Your license key will be locked into the domain name you access next, so make sure this is your new domain name.
- Update MediaCP Configuration
From Administration -> Configuration make sure to update the path to the MediaCP.