Full DirectAdmin Migration Guide: Server Preparation, DNS Planning, and Three Complete Transfer Methods

This guide provides a complete, step by step approach to performing a full DirectAdmin migration. It covers preparing the destination server, DNS considerations, copying custom configurations, and three migration strategies: full backups, partial backups with home directory sync, and advanced migrations with MySQL synchronization. Each method includes detailed instructions, warnings, and best practices to ensure a smooth and reliable migration.

DirectAdmin MigrationServer TransferFull Backup Method

~4 min read · Updated Mar 1, 2026

1. Server Preparation


Before migrating, DirectAdmin must be installed on the new server. You can request a free temporary migration license from DirectAdmin support and use it during installation. After migration, replace it with your original license key.


Important for Legacy Licenses: Temporary licenses are not available. Legacy keys cannot be deployed on new installations, so you must use another legacy license for migration.


1.1 Installation Methods


A. Easy Method — Default Installation


Run the standard installation command. This installs all recommended PHP versions and software.


B. Medium Method — Preload Environment Variables


export [email protected]
export DA_NS1=ns1.example.com
export DA_NS2=ns2.example.com
export php1_release=8.0
./setup.sh LICENSE_KEY

C. Advanced Method — Preload options.conf


You may copy your existing options.conf and the entire /usr/local/directadmin/custombuild/custom/ directory to the new server before installation.


Note: Ensure the versions in options.conf are supported by the current DirectAdmin installer. Outdated MySQL/MariaDB or PHP versions will cause installation failure.


2. Things to Consider Before Migration


2.1 DNS Planning


DNS is the most critical part of migration. Determine who controls DNS zones for all domains.


  • If DNS is external, users must update their records manually.
  • Lower TTL before migration.
  • If registrar changes are required, update DNS zones on both servers to avoid downtime.

2.2 Configuration Files


/usr/local/directadmin/conf/directadmin.conf is usually safe to leave as default. You may update:


  • ns1 / ns2
  • max_username

Copy custom templates only if needed:


/usr/local/directadmin/data/templates/custom
/usr/local/directadmin/scripts/custom

Reconfigure Multi Server Setup if used. Review all php.ini files for each PHP version.


3. Migration Methods


There are three complete migration strategies. The easier the method, the more downtime it causes. Advanced methods reduce downtime but require more experience.


A. Easy Method — Full Backups


Recommended for beginners.


Step 1 — Create Full Backups


Admin Tools → Admin Backup/Transfer
Who: All Users
When: Now
Where: /home/admin/admin_backups/
What: All Data

Step 2 — Transfer Backups to New Server


rsync -av /home/admin/admin_backups/ root@dest_server_ip:/home/admin/admin_backups/ --delete

Step 3 — Restore on New Server


Use the same Admin Backup/Transfer tool to restore all accounts.


Done.


B. Medium Method — Partial Backups + Home Directory Sync


Less downtime, requires more knowledge.


Step 1 — Create Partial Backups


Same as Method A, but in “What” tab deselect:


  • Domains Directory
  • E-mail Data

Step 2 — Restore Users


Verify all users restored successfully. Users with numeric UID indicate failed restore.


Step 3 — Sync Home Directory


rsync -av --progress --delete /home/ root@dest_server_ip:/home/

Warning: This deletes everything in the destination /home/.


Done.


C. Advanced Method — Partial Backups + Home Sync + MySQL Sync


This method minimizes downtime but requires deep knowledge of MySQL and system processes.


Step 1 — Create Partial Backups


Deselect:


  • Domains Directory
  • E-mail Data
  • Database Settings
  • Database Data

Step 2 — Restore Users


Verify all users restored successfully.


Step 3 — Sync Home Directory


rsync -av --progress --delete /home/ root@dest_server_ip:/home/

Step 4 — Stop MySQL on Both Servers


sed -i -e 's/mysqld=ON/mysqld=OFF/g' /usr/local/directadmin/data/admin/services.status
systemctl stop mysqld

MySQL must remain OFF on both servers during sync.


Step 5 — Sync MySQL Data


rsync -av --delete --progress /var/lib/mysql/ root@dest_server_ip:/var/lib/mysql_new/

Run rsync again to verify no changes occurred.


Step 6 — Replace MySQL Directory


Rename mysql_new to mysql.


Step 7 — Copy MySQL Configuration Files


/usr/local/directadmin/conf/my.cnf
/usr/local/directadmin/conf/mysql.conf

Step 8 — Start MySQL and Upgrade


Run:


mysql_upgrade

Then rebuild Roundcube:


da build roundcube

Done.


Written & researched by Dr. Shahin Siami

Related Articles

Email Client Configuration & Dovecot Quota/Monitoring Guide for DirectAdmin Users

This guide explains how to configure popular email clients (iPhone Mail, Thunderbird, Gmail POP/SMTP), enable Dovecot LMTP quota warnings, and check the last login time for all email accounts on a DirectAdmin server. It includes step by step instructions, recommended IMAP/SMTP settings, and useful administrative scripts.

Continue

Troubleshooting Dovecot in DirectAdmin – Fixing IMAP Errors, Authentication Issues, and SSL Certificate Checks

Dovecot is the IMAP/POP3 server used by DirectAdmin. Sometimes users encounter errors such as “Connection dropped by IMAP server” or “unknown user” during authentication. This guide explains how to fix corrupted Dovecot indexes, understand authentication logs, hide unnecessary warnings, and manually inspect SSL certificates on IMAP ports 143 and 993.

Continue

DNS Troubleshooting in DirectAdmin – When named is Running but Domains Do Not Resolve

Sometimes the named (BIND) service runs normally, yet DNS queries fail or domains do not resolve from outside. This guide provides a complete troubleshooting workflow for checking named listeners, firewall rules, named.conf configuration, DNS propagation issues, subdomain problems, resolv.conf errors, and common Apache/Nginx misconfigurations.

Continue

Managing DNS Records in DirectAdmin – Complete Practical Guide for Administrators

DirectAdmin provides a powerful DNS management system that allows administrators to control TTL values, create SRV records, enable DNSSEC, manage subdomain delegation, automate TLSA records, and perform mass DNS updates. This guide explains all essential DNS operations in DirectAdmin with real-world examples and best practices.

Continue

DNS and Nameservers in DirectAdmin – Complete, Practical, and Professional Guide

DNS is the backbone of the internet, responsible for translating domain names into IP addresses. DirectAdmin allows you to create private nameservers (ns1/ns2), manage DNS zones, configure DNS clustering, use external DNS, and troubleshoot common issues. This guide provides a complete, clear, and practical explanation of DNS concepts and their implementation in DirectAdmin.

Continue

CustomBuild in DirectAdmin – Complete Guide to Installation, Updates, Configuration, and Advanced Customization

CustomBuild is DirectAdmin’s primary software management system. It installs, updates, configures, and rebuilds essential services such as Apache, Nginx, PHP, MariaDB/MySQL, Exim, Dovecot, FTP servers, and more. Because most components are compiled from source, CustomBuild offers exceptional flexibility, fast access to new versions, and optimized performance.

Continue