Fully automatic two step migration to a new server using rsync
Here is our problem :
Even on servers with a full 1 Gbps connection, and using cPanel's migrate utility that syncs the files directly without compression during the migration, migrating an account with 100GB of data can take a long time and this is not acceptable for sites with active communities or companies with large e-mail accounts.
Here is the solution :
1) Reduce DNS TTL to 5 minutes at least 4 hours before migrating (depending on default DNS entries TTL)
2) Rsync homedir data accross before migrating
3) Migrate account using an aditional rync before starting and another rync to perform the final migration of the account's homedir.
4) Change DNS zones on old server as well as on the new server so they both point to the new server.
5) E-mail user with a customizable e-mail explaining that his account has been migrated to a new server and what he needs to do to update his e-mail client settings, FTP and cPanel access URLs…
Note : Any DNS entries that do not point to the old servers IP or the users IP should be left unchanged on both servers. Sometimes this is not the case with current account migrations.
We currently do this manually, it works well and we can do a full migration of a 200GB account with only 5 minutes downtime.
We would like cPanel to allow us to do this automaticaly and on multiple accounts. If the procedure worked well we could easily migrate all accounts on a server to a new server with close to zero downtime. Customers would be happy and migrating a whole server would be alot less of a worry.