How to migrate a cPanel account to Direct Admin Personal
Posted on 1 June 2022
Recently we were tasked with migrating accounts from cPanel to Direct Admin Standard Edition. This was a case of generating backups and then renaming these backups to cpmove-user.tar.gz and restoring backups.
With the 1 user limitation of Direct Admin Personal. This option is no longer viable. However, there is an option.
You either need a Direct Admin license with rights to more than one account or alternatively a temporary trial license with rights to more than one account.
Full steps to migrate cPanel to Direct Admin Personal
First thing we need to do is get our staging system setup. If you’re running Direct Admin already you might want to set it up the same. Otherwise we recommend Installing Debian 11. The following pre-install command is for Debian 10/11.
Others can be found on this Direct Admin page.
apt-get update
apt-get install gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libperl4-corelibs-perl libwww-perl libaio1 libaio-dev \
zlib1g zlib1g-dev libcap-dev cron bzip2 zip automake autoconf libtool cmake pkg-config python libdb-dev libsasl2-dev \
libncurses5 libncurses5-dev libsystemd-dev bind9 dnsutils quota patch logrotate rsyslog libc6-dev libexpat1-dev \
libcrypt-openssl-rsa-perl libnuma-dev libnuma1
Once you’ve installed your OS and prerprerequisites you can install Direct Admin with the following command:
bash <(curl -LSs https://download.directadmin.com/setup.sh || curl -LSs https://download-alt.directadmin.com/setup.sh) 'Provided license key should go here'
Obviously the key needs to be for a trial or paid license with that allows more than one account.
After half an hour or so you should check the dashboard to make sure the services are running okay.
Generating the backup file
Once the interim virtual machine is setup you can go to your cPanel account now and create a backup.
You can do this by searching for backup, clicking backup and then Download a Full Account Backup.
Depending on the size of your website this could take some time. Once complete, you’ll want to download the backup and rename from backup-4.29.2022_19-28-50_user.tar.gz to cpmove_user.tar.gz.
Uploading the backup
From here you should be able to go the direct admin file manager and under the folder admin backups, you’ll need to upload your backup here. If your site is fairly large, you might prefer FTP.
Importing the backup
Now if you search for backups within Direct Admin, this will take us to the backups area. We’ll need to restore. This could take a while depending on the size of the account (site/sites). We found we typically got some errors that could be ignored. Although it’s probably worth checking this under your Direct Admin notifications.
Generating the 2nd backup
Once you’re happy you’ve restored the cpmove file, you can now generate a backup in Direct Admin. Once this is done, head back to the file manager and download this file. We need to rename this file to admin.root.admin.tar.zst.
Uploading and Importing the 2nd backup
Now we need to go the dashboard of our server with Direct Admin personal. Upload the backup and restore again. It will likely complain about overwriting data and should show the file in yellow on the backup restore page. Both of these are a good sign as it means you are not going to go over your single user limit.
We did read about a tool for doing this but as we had a 2nd Direct Admin server setup already, this was the easiest way for us and depending on your circumstances, you may find it’s an easier way for you too. At least gives another alternative anyway?
If you’re not already using Direct Admin but would like to have Direct Admin hosting. We’re able to provide shared hosting and VM’s all with a 1Gbps connection, please see our hosting page or get in touch today for more information.