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

~3 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