tabletguy (User)
Posts: 51
|
| Migrate from Virtualmin to Virtualmin 2008/08/18 22:05 |
|
|
I have a second (new) server. I want to migrate all domains from existing server to the new server. I didn't find anything on the documentation wiki to cover this. I also tried searches in the forum, but either I'm not a great searcher (likely), or the topic doesn't already exist...
Couple questions:
1) Should I create a single virtual site before migrating any of the existing sites? (I.E. the server currently has zero sites).
2) Is there a special order to migration?.
3) Is there a batch migration option?
4) I have some subdomains/subservers within the same home directory as the parent, and some as separate home directories.
So, what happens when I migrate the parent directory in those cases? What is the recommended way to move those domains, etc.
5) The most basic question: How to do the migration, exactly? I.E. a) backup and transfer the backup? b) import on the new server?
When would I "turn off"/delete the site on the old server, in this case?
(I'd wish there was a single point to administer this on the NEW server, which would connect and migrate automatically, in a transaction)
|
|
|
|
The administrator has disabled public write access. |
PatrickLambooy (User)
Posts: 14
|
| Re:Migrate from Virtualmin to Virtualmin 2008/08/19 05:12 |
|
|
Same question here im migrating to a new server from FC3 x86 to Centos5 x64 And with all the diff's like mysql 4 /5 php 4 /5 etc is pretty hard. But also with plain website it doesnt work that great to backup and restore what is the best way to do this ? Maybe Joe can give a write up on his thoughts...
When Windows isn't a option then you know you are on the right track...
|
|
|
|
The administrator has disabled public write access. |
andreychek (Moderator)
Posts: 581
|
| Re:Migrate from Virtualmin to Virtualmin 2008/08/19 05:15 |
|
|
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
|
|
|
|
The administrator has disabled public write access. |
tabletguy (User)
Posts: 51
|
| Re:Migrate from Virtualmin to Virtualmin 2008/08/20 22:07 |
|
|
Thanks for the response.
One more aspect of the migration (or perhaps a couple)
There are other settings (customized letter formats, custom defaults, etc) for Virtualmin, as well as customized Squid settings and firewall rules.
Is it possible to migrate all of those items (maybe cron jobs as well).
Most of the above was setup by other than me, and some by installs (optional steps outside of Virtualmin scripts).
|
|
|
|
The administrator has disabled public write access. |
rawww (User)
Posts: 68
|
| Re:Migrate from Virtualmin to Virtualmin 2008/08/20 23:02 |
|
|
As I think I understand virtualmin & webmin little bit I think that everything is written into $prefix/etc/webmin configuration files (for webmin and virtualmin) - you can inspect this folder and move necessary configuration files (but I don't think it is neccessary) - other files are configuration files for each server (like Squid, Apache, ProFTPd etc.) and webmin is parsing them and writing configuration into them instead of admin hands. So if you will move those configs onto your new server it should work cause newer versions of software should understand older config files.
Of course there are rules like BACKUP EVERYTHING and TEST IT WELL. If you are moving on new server I think that there may be no problem with this as you can undo whatever you did and try it again. When you will be ready with you new setuped server you may start with changing DNS records. Maybe there can be a problem with TTL as been mentioned before if you have many users and they are changing site contents often - but this can be solved by lowering TTL for DNS records to minimum and than writing something - site is moving to new one into each website on old server for those people whom will come to old server.
|
|
|
|
The administrator has disabled public write access. |
|
| Re:Migrate from Virtualmin to Virtualmin 2008/09/24 02:03 |
|
|
I did quite a couple of these virtualmin to virtualmin migrations in the last couple of month and often had problems, though all server were the same OS (Debian w. apache2, postfix, mysql).
My hint if things fail: turn an option off an back on. Make sure you have identical templates. Do serious testing (esp. w. mail accounts)
I would very much appreciate a feature that eases V2V migrations and which checks when don, that REALLY EVERYTHING is transferred, in place and working.
H.
|
|
|
|
The administrator has disabled public write access. |
xerxeschua (User)
Posts: 14
|
| Re:Migrate from Virtualmin to Virtualmin 2008/11/13 14:13 |
|
|
Can anybody confirms that this how to work? By the way.. Joe, do you have official how to on migrating virtualmin to another virtualmin box which is newly set-up using the install.sh? Hope to hear from you. THanks.
|
|
|
|
The administrator has disabled public write access. |
Joe (Admin)
Posts: 4082
|
| Re:Migrate from Virtualmin to Virtualmin 2008/11/13 14:28 |
|
|
I did quite a couple of these virtualmin to virtualmin migrations in the last couple of month and often had problems, though all server were the same OS (Debian w. apache2, postfix, mysql).
File bugs! We can't fix it, if we don't know it's broken.
It works in our tests...so we need you to tell us when things don't work.
|
|
|
|
The administrator has disabled public write access. |
xerxeschua (User)
Posts: 14
|
| Re:Migrate from Virtualmin to Virtualmin 2008/11/13 14:31 |
|
|
So joe.. you confirmed that andreychek how to works in your test, right?
|
|
|
|
The administrator has disabled public write access. |
Joe (Admin)
Posts: 4082
|
| Re:Migrate from Virtualmin to Virtualmin 2008/11/13 14:35 |
|
|
andreychek is usually smarter than I am. You can trust his advice, generally, and if not, I'll usually amend or correct. I see nothing to complain about in this howto.
Since I have far fewer sites to move than some folks, I usually do make the move one virtual server at a time, which means I can focus on making sure everything is right for each one. But, it's merely a matter of order of operations, not any particular right or wrong.
|
|
|
|
The administrator has disabled public write access. |
|