Hi folks, As a server admin we’ve to handle multiple servers with control panel and without it. DirectAdmin is also one among the popular control panel in the web-hosting industry with its default port 2222. Most of all server admins will be familiar with cPanel migration, here I’m explaining the detailed steps for DirectAdmin to DirectAdmin migration. It’s also very easy. As in cPanel transfer tool there’s no such option to do DirectAdmin to DirectAdmin migration. This can be achieved by following the steps given below. For simplicity I’ll give you step by step instructions:

Step 1: Skip home directory from backup

Log into your source server via SSH and with your favorite editor say vi or nano, take /usr/local/directadmin/conf/directadmin.conf. Set/add skip_domains_in_backups=1 in it. This will prevent copying Home directory while taking backups.

# grep skip_domains_in_backups /usr/local/directadmin/conf/directadmin.conf 


Step 2: Creating backup on source server

Access source server’s DirectAdmin panel. Navigate to Admin tools >> Admin Backup/Transfer. Select all users (if you need to migrate all users or else select the user you need) and then click on “now” to take the backup at that instant. By default the backups will be copied to the location /home/admin/admin_backups locally (which means on the source server itself). Then select all the data to be copied and then click on submit.

Now the backups will be created in the location /home/admin/admin_backups of the source server.



Step 3: Syncing backup to destination server

Now we need to copy the backups from the source server to destination server. For that we can use rsync command. Here’s a sample command. You can use according to your preference.

P.S Run rsync on screen
# rsync -avz --progress -e ssh /home/admin/admin_backups/ root@destination_server_ip:/home/admin/admin_backups/

This will copy all the backups over to your destination server’s /home/admin/admin_backups/ location.

Step 4: Restoring backup

Now access your destination server’s DirectAdmin panel.

>> Navigate to Admin tools >> Admin Backup/Transfer.
>>From Where” select local /home/admin/admin_backups
>>Select IP” Use the IP from the list and select the shared IP of the server or if you need to use a dedicated IP, use the one that you prefer.
>> Select the backup files
>> Click on submit.

Now all your selected backups will be restored to the new server. Monitor the restoration process using ps (about ps command usage) or top (more about top command).

Step 5: Rsync the home folders.

When the restoration completes, we can proceed with the rsync of home folders. Here’s an example command to be executed from the source server:

# rsync -avz --progress -e ssh /home/ root@destination_server_ip:/home/

That’s it !

Leave a Reply

Your email address will not be published. Required fields are marked *