Howdy,
I just did something similar! A few thoughts –
tabletguy wrote:
1) Should I create a single virtual site before migrating any of the existing sites? (I.E. the server currently has zero sites).
So long as you have a decent way to get to your server, I’m not sure it matters that you have a site setup there.
2) Is there a special order to migration?.
There shouldn’t be. If there is, it’s likely a bug – save the backup file so you can give it to Jamie and allow him to fix it
If you run into an error importing one of your virtual servers, simply skip that one and go back to it later, it might just work once everything else is done.
3) Is there a batch migration option?
5) The most basic question: How to do the migration, exactly? I.E.
Where I would start is to perform a normal backup of your Virtual Servers. I like the "One file per server" option (which creates a tar.gz file for each domain you have hosted there).
When you’re done, you’ll have a directory full of tar.gz files. Copy that entire directory to the new server.
Then go into Webmin on the new server, choose "Restore Backup", and point it to the directory full of your tar.gz files.
At that point, it will give you a list of what all it plans to do during the restore.
4) I have some subdomains/subservers within the same home directory as the parent, and some as separate home directories.
I suspect you’ll be fine here, but you might need to give it a shot and find out You don’t need to make it live until you see things working.
So, what happens when I migrate the parent directory in those cases? What is the recommended way to move those domains, etc.
If you’re able to, I might recommend doing it all at once (ie, perform the backup of everything, copy, restore).
When would I "turn off"/delete the site on the old server, in this case?
I’ll offer the steps I used for my migration, I think that might help answer your question:
-
Warn users that stuff is moving
-
Lower the DNS TTLs so prevent DNS from being cached for too long (the $TTL number at the top of each domain.com.hosts file)
-
Backup Virtual Servers
-
Copy Virtual Server backups to new Server
-
Restore Virtual Servers
-
Log into Webmin on the new server, and for each Virtual Server, click Services -> View Website via Webmin, in order to verify that each site is working (remember, the sites aren’t live yet, but this Webmin feature allows you to see them even when not live)
-
Once things appear to be working reasonably well, log into the registrar and update the "glue records" – that is, make sure the IP address assigned to the nameservers being used is pointing at the new box, rather than the old one
-
Put the DNS TTL’s back to normal
I wouldn’t get rid of the sites on your old server for at least a few days after the transition. Some folks may still be hitting your old server for a few days since DNS records are cached, it may take a bit before everyone is hitting the new server. Lowering the DNS TTL’s should help with this, but still…
Also, how well the above works depends on how much stuff you need to transfer and how long that transfer will take. If you can do all that in a few hours in the middle of the night, that’s one thing – but if it takes days, you might want to consider running rsync after the restore to pull over anything from /home on your old server that may have changed since you performed the backup.
There’s also the option of migrating one Virtual Server at a time, but I personally find that cumbersome
Good luck!
-Eric