Knowledge Base

How Can We Help?

Migrate accounts from DirectAdmin to DirectAdmin

You are here:

Transfer accounts from DirectAdmin to DirectAdmin

DirectAdmin is a web-hosting control panel with a graphical interface for managing websites on a server. It is similar to cPanel, which allows you to easily manage your websites and make server-wide changes, and it uses port 2222. You can manage unlimited websites, email accounts, and more. Additionally, the DirectAdmin panel has numerous features like cPanel.

As we all know how to migrate a website between cPanel servers, in this tutorial, we will explain how to transfer accounts from one DirectAdmin panel to another DirectAdmin panel. This can be achieved by following the steps given below. Here, we have two servers: server A as the source server and server B as the destination server.

Let’s discuss the migration steps between DirectAdmin panels:

1) Login to server A via SSH as the root user and edit the line “skip_domains_in_backups=1” in the “directadmin.conf” file located in the “/usr/local/directadmin/conf/” directory. If the line doesn’t exist, add it as mentioned above and save the file. This modification in the configuration file will prevent the copying of the home directory while taking backups through the DirectAdmin panel. We can check the value of the above directive by executing the command below.

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

2) After making the changes on server A, access its DirectAdmin panel and click on “Admin Backup/Transfer” under “Admin tools”. Select the users you need to transfer from the left list under “Who”, and then select “now” to take the backup immediately. By default, the backups generated will be saved on server A at the location “/home/admin/admin_backups”. Then select “All Data” to copy all the data, such as the domains directory, subdomains directory, FTP accounts, email data, etc. Finally, click on the “submit” button.

Transfer Accounts From Directadmin To Directadmin

3) After the backup generation is completed on server A, we need to copy the backups to server B using the “rsync” command in a screen. The command below will copy the backup to server B to the location “/home/admin/admin_backups”.

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

Replace ‘destination_server_ip’ with the IP address of server B.

4) Access the DirectAdmin panel of server B. Then select “Admin Backup/Transfer” under “Admin tools”. Select the backup files located at “/home/admin/admin_backups” and click on “Submit”.

5) When the restoration is complete on server B, we need to synchronize the contents of the home folders by executing the “rsync” command on server A as shown below.

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

Leave a Comment