How we migrated cPanel servers to DirectAdmin servers for a major web hosting client.

About the Client:-

The client provides Web Hosting services on Linux and Windows servers globally using various hosting control panel platforms. The client is one of the Top5 web solution companies in India.


cPanel is one of the world’s popular web hosting control panels and webhosts simply love cPanel when it comes to the services they offer. Recently, cPanel has changed their packages and increased their prices. The client approached us to execute the following jobs.

  1. Migrate Shared cPanel web hosting servers to Directadmin panel.
  2. Migrate existing shared accounts to a new Directadmin server with 0% data loss and minimum downtime.


  1. The client had around 15 shared cPanel servers and numerous virtual machines. Each shared server had around 300-700 accounts including several reseller accounts.
  2. We were supposed to migrate the data of each account’s web hosting files, addon domains, sub-domains, parked domains, databases, email accounts, FTP users, etc, and include their current settings to new Directadmin servers without data loss.
  3. Migrating domains/users that had more than 5GB size was one of the main challenges. The size was a big factor during the backup conversion. The migration consumes more time if the data transferred is huge.
  4. Some of the domains were using PostgreSQL databases for their applications. Directadmin does not support PostgreSQL by default. So customization was needed in the conversion process.
  5. Once the migration was done, we had to cross-check and verify the do0main’s working, web file size, database count and size, email accounts count and size, DNS records, FTP accounts and setting, sub-domain, addon domains & parked domains count and their setting, etc.

The Activelobby Difference

After evaluating the client’s requirement, our team analyzed the challenges involved in migration. cPanel to DirectAdmin backup conversion script was available in Directadmin forums, however, the script didn’t look like it solved the challenges we had analyzed.

The Directadmin cPanel-DA conversion script just converts a cPanel user backup equivalent to a DA compatible backup format and we have to restore the backup from the DA admin backup section. 

The cPanel-DA migration process has basically 4 steps,

  1. Take a cPanel user backup
  2. Copy to the destination server i.e DA server
  3. Convert the cPanel user backup to the corresponding DA user backup.
  4. Restore the DA user backup from the DA panel.

Using the above steps, it was possible to do a single account at a time. Since the data to be transferred had multiple parameters to be handled, the verification would be inaccurate and would need more manpower and time for the process. 

We decided to follow the following steps to complete the migration.

  1. Our team created two custom bash scripts.
  2. The first bash script automated the process of taking a user’s cPanel backup without data, copy to the destination DA server, convert the cPanel user backup to corresponding to DA user backup and then restore the converted DA user backup with respect to the Reseller account and packages.
  3. On successful restoration, the script would start to restore the user’s data from the cPanel to the respective account’s path in the DA server. 
  4. The second bash script automated restoration of the domain’s data including files, database, email, and their settings.
  5. If mismatches are found in data or setting, the script reinitiates the restoration again, otherwise, the script updates DNS records of the domain to the destination server and verify HTTP status code and send the whole status through an email.


  1. Successfully completed the whole migration task within the prescribed time and minimal man power.
  2. The scripts automated the entire process and all we need was to look for emails with unsucessful migration alerts.
  3. Post-migration issues were minimal after migration.
  4. Migrated PostgreSQL users manually to Directadmin server with compatible version and pgAdmin panel.

Tools Used

  1. Bash Scripts: We used custom bash scripts to automate the migrations
  2. To convert cPanel back to DA, we used the “cpanel_to_da” Directadmin script.

Leave a Reply