I want to migrate some of my sites to my new server, and have found this guide: http://www.virtualmin.com/documentation/system/migrate but it migrates all sites to the server and I don’t want to migrate all of them.
Is there a way to migrate individual sites? Also, does it copy everything? Databases? Emails?
Would large databases pose any additional problems? One of my mysql databases is quite large, 325MB when bz2’d.
about the TTL stuff http://webmonkeyuk.wordpress.com/2010/10/12/using-dns-ttl-to-control-migrations/
and as handy reference:
scp [options] [source] [destination]
- either source or destination can be a remote host, just enter [user@host:path/to/files]
Also, just to answer your original question – it’s no problem at all to migrate individual sites.
The migration process is just about performing backups, and restoring those onto the new server.
So on your new server, rather than restoring all the sites, just restore the ones you want.
When restoring a site, it’ll restore all the features that were included in the backup.
I would recomend doing it manualy.
The day before the move, set your TTL to 3600 (1 hour) That way, within a day “everyone” will be checking every hour.
The day of the move;
- Create a virtual server on your new server. Set your TTL (on the old server) to 600 (10 min, so within 1 hour "everyone" is checking every 10 minutes)
- Copy all your files over using SCP via command line.
- Setup and configure any databases required.
- TEST and be sure your site is working on the new server. (I use a local HOSTS file to force my browser to the new server IP)
- If everything is working, update your DNS record with the new server IP, and set TTL to 60 (1 minute)
- after about 10 minutes, if everything is still functioning well, update your nameservers with the registrar and set the TTL (on the old server) back to the default value 14400 or 86400 etc.
This way you can move 1 site at a time, and when you throw the switch (update IP address in DNS record on old server) “everyone” is onto the new server within 1-10 minutes.
If you have no idea what I am talking about, Google is your friend.
Thanks for the replies both.
Is there any way to export an account then import it on the new server? (I think cPanel has something like this?)
Or does Virtualmin ask you which accounts you want to restore if we follow the guide I linked to above?
I’m familiar with manually transferring sites, but was hoping there was an easier virtualmin to virtualmin method. If I copy and restore the directories in the home directory - will Virtualmin automatically pick up email accounts/forwarders etc?
Or would it be best just to follow the guide in the first post to restore all accounts and then just delete the ones I do not want transferred?
To perform a migration from one Virtualmin server, the Virtualmin-recommended way is to use the Backup and Restore method. You can choose whether to do one domain at a time, or all domains at once.
If you manually copy the files/directories, Virtualmin will not automatically pick up any account details – you would then need to manually re-create that as well.
Using the Backup/Restore method would handle all that for you, and is our recommendation.
You can’t pick and choose which accounts to migrate within a given domain. It’s either all accounts or no accounts.
However, it’s very simple to delete accounts that you don’t want. So after migrating your domain, just go into Edit Users, select the users you want to delete, and hit the “Delete Users” button.
Thanks - that was easier than I thought it would be
Only issue I found was having to change +FollowSymLinks in the htaccess to +SymLinksIfOwnerMatch