MediaCP Manual
Migrate to another server

Last updated 2 months ago

  • Before migrating to a new server, we recommend upgrading to the latest version of the MediaCP.
  • A valid license is required to complete the restoration process.
  • Transferring of files can often take hours to complete, be sure to leave enough time before terminating your old server.
  • Before completing a migration, you should request that both old and new server IP addresses be added to your software license.
  • The restoration process will prompt you for a custom media content path if you wish to relocate your media files to another disk during the migration

1. Prepare DNS records

It is highly recommend to lower the Time To Live (TTL) of your DNS records to 300 before migration.

2. Backup MediaCP

You must decide to backup the entire MediaCP (large files) or only the database and information (no media files).

The full backup may take a lot of disk space and a long time to transfer between servers, depending on the network speed. A partial backup is much smaller and faster to transfer.

All backups include:

  • Media Control Panel database
  • All media service information and statistics
  • SSL Configurations

Run the following in SSH as root and a new tar backup will be saved in /backups/

/root/init backup --backup-dir=/backups/

Run the following in SSH as root and a new tar backup will be saved in /backups/

/root/init backup --backup-dir=/backups/ --no-contents

3. Transfer backup to new server

The easiest way to transfer the backup to the new server is directly via SSH connection using the SCP utility in linux.

The following example will copy a backup from the /backups/ folder of the old server to the new server.

You will be prompted to verify the authenticity of the host and also enter the new servers root password

scp -P 22 /backups/mediacp_20190726.tar [email protected]your-new-server-ip:/root/

4. Restore the MediaCP

Start the restoration utility with the following command on the new server
cd /root;rm -f init;wget;chmod +x init;./init restore

a) You will be prompted for your license key and the path to the backup file.

b) You will also be prompted to specify a location for you media content files. If you wish to leave this as default, simply press return. If you wish to install the media files to a different location, you may do so here and a symlink will be created automatically from /usr/local/mediacp/content to the new location.

The path to the backup file should be /root/mediacp_20190726.tar (replacing mediacp_20190726.tar with the name of your backup file).

c) If you have a Video license, then you will be prompted to reinstall the video streaming engine; make sure to install the streaming engine via our restoration utility.

5. Restore Video Server Configuration

5.1 Nginx-Rtmp

No actions are required, nginx-rtmp configurations are automatically migrated.

5.2 Wowza Streaming Engine

On the original server run the following, make sure to replace the ip address with your new server ip:

scp -rpP 22 /usr/local/WowzaStreamingEngine/conf/ [email protected]your-new-server-ip:/root/;
scp -rpP 22 /usr/local/WowzaStreamingEngine/applications/ [email protected]your-new-server-ip:/root/

On the new server run the following command:

mv /usr/local/WowzaStreamingEngine/conf /usr/local/WowzaStreamingEngine/conf.original;
mv /usr/local/WowzaStreamingEngine/applications /usr/local/WowzaStreamingEngine/applications.original;
mv /root/conf /usr/local/WowzaStreamingEngine/conf;
mv /root/applications /usr/local/WowzaStreamingEngine/applications;
systemctl restart WowzaStreamingEngine
5.3 Flussonic Media Server

On the original server run the following, make sure to replace the ip address with your new server ip:

scp -rpP 22 /etc/flussonic/flussonic.conf [email protected]your-new-server-ip:/root/

On the new server run the following command:

mv /etc/flussonic/flussonic.conf /etc/flussonic/flussonic.conf.original
mv /root/flussonic.conf /etc/flussonic/flussonic.conf;
service flussonic restart;

5. Check new server is running appropriately

We recommend thoroughly testing your panel before switching DNS records.

Firstly, on your new server in SSH open /etc/hosts (nano /etc/hosts) and ensure your domain name is mapped to the loopback address See the below image example

You can do this by updating your systems hosts file to point your domain name at the new server, so only you can see the new server and your customers will still access the original server.

Open your systems hosts file:

  1. Navigate to C:\Windows\System32\drivers\etc 
  2. Right click hosts file and Open with “Wordpad”
  3. Add a new line containing your new servers IP Address and your domain name, separated by a single space. It should look like the below.
  4. Close all instances of your web browser then start it again
  5. Open the following URL in Google Chrome and press “Clear Host Cache”:
  6. Open the MediaCP address and verify the page you are looking at is the new server:

    1. Press F12 in Google Chrome to open “Developer Tools”
    2. Select Network tab and the “Doc” sub-tab
    3. Refresh the page and you will see a single request
    4. Select this request and verify the IP address as shown in the image below. If the IP address does not match your new server then you need to close ALL instances of google chrome and try again:
Once you have successfully tested the new server, remove the line from the hosts file and restart your web browser again.

6. Update DNS Records

a. Wowza Streaming Engine StreamLock

  1. Login to Portal
  2. Select the StreamLock tab
  3. Scroll down and select the Change link next to your stream lock certificate
  4. Input your new servers IP Address and press save

b. MediaCP Domain Name

Update your DNS record to point to the new server.

Table of Contents