MediaCP Manual
    1. Getting Started
    2. Sales Questions
    3. Frequently Asked Questions
    4. Transcoder System Benchmarks
    5. Start your own streaming platform
    1. Change account currency
    2. Product Licensing
    1. Introduction
    2. Installation & Upgrade
      1. System Requirements
      2. Versions & Releases
      3. Installation
      4. Upgrading
      5. SSL Certificates
      6. Streaming Servers
        1. Nginx-Rtmp Video Server
        2. Wowza Streaming Engine
        3. Flussonic Media Server
        4. Video Feature Comparison
        5. Icecast 2 / Icecast KH
        6. Shoutcast 2
    3. Billing Integration
      1. WHMCS Integration Guide
      2. Clientexec Integration Guide
      3. Blesta Integration Guide
      4. WiseCP Integration Guide
      5. Billing Platform Comparision
    4. Migrate from other software
      1. Migrate From Centovacast
      2. Migrate From AzuraCast
    5. Backup & Restoration
      1. Backup MediaCP
      2. Restore MediaCP
      3. Transfer to another server
    6. Administration
      1. MediaCP System Commands
      2. Admin Tools
      3. Custom Web Service Configurations
      4. Change MediaCP domain name
      5. Port 80 / 443 Proxy
      6. Move media to another hard disk
      7. Custom Language Translations
      8. Custom Facebook App
      9. Branding Your Panel
      10. Secure your server
      11. Setup CSF Firewall
      12. Troubleshooting Login Errors
      13. Reset Admin Password
    7. Scaling
      1. Scale with Wowza and CloudFront CDN
      2. Nginx-Rtmp with CloudFront CDN
    8. Troubleshooting
      1. Reporting Troubleshooting
      2. Troubleshooting Liquidsoap AutoDJ
      3. Video Relay Troubleshooting
      4. Disk Troubleshooting
      5. Grant access to support team
      6. Troubleshooting Wowza Streaming Engine
      7. FTP Troubleshooting
      8. MySQL Database Troubleshooting
    1. Introduction
    2. Administrators Dashboard
    3. System Configuration
      1. General
      2. Services
      3. Video Players
      4. Albums
      5. Email
      6. Plugins
      7. Statistics
      8. Backups
      9. Custom HTML
      10. Misc
    4. Customer Accounts
      1. Managing existing Customers
      2. Create a new Customer
      3. Deleting a Customer
      4. Send email to Customer
      5. Login as another Customer
      6. Reset Customer Password
    5. Reseller Accounts
      1. Reseller Plans
      2. Create a Reseller Account
    6. Administrator Accounts
      1. Create a new Administrator
    7. Media Services
      1. Creating a Media Service
      2. Deleting a Media Service
    8. Announcements
      1. Managing Announcements
      2. Creating Announcement
      3. Deleting Announcement
    9. Statistics
    10. Software Health
    11. Software Updates
    12. Email Templates
    13. API
    1. Introduction
    2. Audio Operation Manual
      1. Basics 101
      2. Station Overview
      3. Media Library
      4. Playlists
        1. General Rotation
        2. Jingles & Advertising
        3. Scheduling
        4. Repeat Protection
      5. Live DJ Connections
      6. Live Stream Recording
      7. DJ Manager
      8. Country Blocking
      9. Fallback, Backup and Intro Files
      10. Stream Proxy
      11. Public Page
      12. HTML5 Player
      13. Stream Authentication
      14. Widgets & Links
      15. Reporting
    3. Video Operation Manual
      1. Basics 101
      2. Service Overview
      3. File Manager
      4. Scheduling
      5. Streaming to Your Service
      6. Stream Targets
      7. GeoIP Country Locking
      8. Public Page
      9. Widgets & Links
      10. Reporting
    4. Reseller Operations Manual
      1. Reseller Dashboard
      2. Customers
      3. Media Services
    5. API
    1. Custom Domain Names
    2. Shoutcast 2 Admin Guide
    3. Wowza and Flussonic on same system
    4. Submit a feature request
    1. Getting started with Audio Streaming
    2. Icecast Live Broadcasting
    3. Shoutcast 2 Live Broadcasting
    4. Broadcasting with AutoDJ
    5. DJ Accounts
    6. GeoIP Country Locking
    7. HTML5 Audio Player
    8. Mount Points
    9. Managing Your Media
    10. Managing Media Using FTP
    11. Statistics
    12. Shoutcast 2 Premium
    1. Getting started with video streaming
    2. Live Streaming Overview
    3. TV Station Overview
    4. Ondemand Video Streaming
    5. GeoIP Country Locking
    6. VAST Advertising
    7. Relay & IP Camera
    8. Stream Recording
    9. Connecting your encoder
    10. Preparing Your Media Files
    11. Managing Media Using FTP
    12. Understanding Video Playlists
    13. Embedding player on your website
    14. Smooth Streaming and Content Transition
    15. Video Transcoding (Adaptive Bitrate Streaming)
    16. Stream Watermark​
    17. DVR Rewind
    18. Statistics
    19. Facebook Live Streaming
    20. Youtube Stream Publishing
    21. Twitch Stream Publishing
    22. Shoutcast 2 Stream Publishing
    23. Icecast Stream Publishing
    24. RTMP Stream Publishing
    1. Cloud Video Overview
    2. Admin Manual - Cloud Video
      1. Plans & Customers
      2. WHMCS Billing Provisioning Module
      3. Login to your cloud platform
      4. Dashboard - A First Look
      5. Branding your platform
      6. Team & Staff Members
      7. Activating VOD on Customer Plan
      8. API
    3. User Manual - Cloud Video
      1. Login to your video platform
      2. First Look
      3. Creating a Channel
      4. Channel Overview
      5. Broadcasting
      6. Recording
      7. Media Content
      8. Live Events
      9. 30 Minute Rewind
      10. Fallback Video
      11. TV Channels - 24x7 UGC
        1. TV Event Scheduling
        2. Channel Guide Widgets
      12. Video on Demand
      13. Relay Channels
      14. VOD Playlists
      15. Publishing
      16. Bandwidth Utilisation
      17. Viewing Analytics
      18. Publish Zoom Meetings
      19. Advertising
      20. Restreaming IP Cameras
    4. Video Guide Series
    5. Streaming Best Practices
    6. Feature Comparison
    7. Roadmap & Release Notes
Transfer to another server

Last updated 2 months ago

  • Before migrating to a new server, we recommend upgrading to the latest version of the MediaCP.
  • Please ensure the new server meets MediaCP’s System Requirements, including the access to the required ports is not blocked by a firewall.
  • 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. Ensure you are logged in as root 

It is required that you follow these steps as the root user to migrate your Media Control Panel.

3. 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.

If the Media Contents path (/usr/local/mediacp/content/) is very large then you might consider a Partial Backup and manually configure an rsync of the Media Contents to another disk or server; this will dramatically improve backup performance. We have directions for this in at Step 5.1 Transfer Media Content

All backups include:

  • Media Control Panel database
  • All media service information and statistics
  • SSL Configurations
3.1 Full backup of MediaCP and media (audio/video) files

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

/root/init backup --backup-dir=/backups/
3.2 Partial Backup of MediaCP only

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

4. 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 root@your-new-server-ip:/root/

5. Restore the MediaCP

Start the restoration utility with the following command on the new server
cd /root;rm -f init;wget http://install.mediacp.net/scripts/init;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.

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.1 Transfer Media Content

Rsync Content Directory

You will need rsync to be installed on both the old and the new server in order for this to work. You will need to use rsync to copy your content directory to the new server recursively.

Debian/Ubuntu

apt install rsync

CentOS/AlmaLinux

yum install rsync

Transfer Content Directory

Once rsync is installed on both servers run the following command on the original server to transfer your content directory to your new server. This command excludes logs to save time and space. This will likely take a very long time depending on the size of your content directory.

rsync -rav --exclude '*.log' --exclude '*.w3c' /usr/local/mediacp/content root@your-new-server-ip:/root/

Once the rsync is completed you will need stop the MediaCP service and all streaming services on the new server to prevent any issues.

systemctl stop mediacp;
systemctl stop WowzaStreamingEngine;
systemctl stop WowzaStreamingEngineMananger;
systemctl stop flussonic;
pkill icecast;
pkill sc_serv;
pkill liquidsoap;
pkill ices;

Once the services are all stopped you will need to move the content folder created during the restoration on the into a new content.bak directory for safekeeping.

mv /usr/local/mediacp/content /usr/local/mediacp/content.bak

Once this has been completed you need to move the content you rsync’d over from the root directory into the mediacp directory

mv content /usr/local/mediacp/content

Then restart all services and check to ensure all the content has successfully been transferred and can be found in the MediaCP services.

mediacp restart services

6. Restore Video Server Configuration

6.1 Nginx-Rtmp

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

6.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/ root@your-new-server-ip:/root/;
scp -rpP 22 /usr/local/WowzaStreamingEngine/applications/ root@your-new-server-ip:/root/
scp -rpP 22 /usr/local/WowzaStreamingEngine/templates/ root@your-new-server-ip:/root/

On the new server run the following command:

systemctl stop WowzaStreamingEngine;
mv /usr/local/WowzaStreamingEngine/conf /usr/local/WowzaStreamingEngine/conf.original; mv /usr/local/WowzaStreamingEngine/applications /usr/local/WowzaStreamingEngine/applications.original; mv /usr/local/WowzaStreamingEngine/templates /usr/local/WowzaStreamingEngine/templates.original;
mv /root/conf /usr/local/WowzaStreamingEngine/conf; mv /root/applications /usr/local/WowzaStreamingEngine/applications; mv /root/templates /usr/local/WowzaStreamingEngine/templates; systemctl restart WowzaStreamingEngine
6.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 root@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;

7. Re-enable port 80/443 proxy

If you were previously using the port 80/443 proxy then you will also need to enable it on the new server.

/root/init enable-http-proxy

8. 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 127.0.0.1. 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. If using Wowza Streaming Engine StreamLock add another line with your new servers IP Address and the StreamLock address, separated by a single space.
  5. Close all instances of your web browser then start it again
  6. Open the following URL in Google Chrome and press “Clear Host Cache”:
    chrome://net-internals/#dns
  7. 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.

9. Update DNS Records

a. Wowza Streaming Engine StreamLock

  1. Login to wowza.com 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