Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th August 2010, 06:55
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default Migrate ISPConfig/Debian/Drupal to another box ... and keep them in sync.

Sorry if you believe I am beating a dead horse by asking this question ... but I have been trying to piece together the best course of action from what I am reading here.

Question/Problem:
o I have ISPConfig2 + Drupal6 + Debian Lenny working great ... built from "Perfect Debian Etch + ISPConfig" which I then upgraded Debian and Drupal
o I have prototyped everything on a virtual machine and currently simply Backup/Restore the entire OS/virtual machine image between two separate virtual machines (two separate locations) i.e. --> same IPs (natted), same everything, but on two different networks. Works GREAT (even though being run on completely different types of hardware!)
o Now I want (need) to put this config onto a VPS and maintain the virtual machine as a "hot spare" (via DNS failover)/dev/test
o Among other things, VPS will be on a completely different ("real") IP vs "natted" IP, etc


o What is the best plan for keeping things "in sync" -- I would REALLY like to avoid MySQL Replication if at all possible!
o Can I duplicate the config onto the VPS and then tar the whole OS (or just the /var/www, /var/lib/mysql and /etc/..., password+shadow directories) and then only have to change the IP
o Would ISPConfig2 adjust to changing the one and only IP? Or would I have to reconfigure ISPConfig2 after changing the system IP?

What is the easiest, most reliable way to get this going?

Thanks in advance for any hints/suggestions.

I am SERIOUSLY lamenting not being able to just keep the virtual machines going because they have worked SO well, but I would then be running virtual machine on a virtualized (VPS) environment and, of course, that doesn't make any sense.

Here is one recent article that I reviewed and another that seemed to almost cover it all
I have also tried to review most all documents in the "Backup" section, here: http://www.howtoforge.com/howtos/backup

Last edited by tester321; 4th August 2010 at 14:15. Reason: Corrected 1 typo, also added a link to a really useful post from this forum that I reference in the followup response to Till
Reply With Quote
Sponsored Links
  #2  
Old 4th August 2010, 10:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

For the files in /var/www, use e.g. rsync. For the databases you can either use mysql replication, a mysql cluster setup or if the database content is not that time critical you can try to dump the mysql database automatically every few minutes and trsnafer this dump to the other server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 4th August 2010, 14:02
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
For the files in /var/www, use e.g. rsync. For the databases you can either use mysql replication, a mysql cluster setup or if the database content is not that time critical you can try to dump the mysql database automatically every few minutes and trsnafer this dump to the other server.
Till, thank you so much for your quick reply. I had seen Falko's response to what seems like a similar question in (this thread) and wondered a few things

1) Since I won't really have "load balancing", but will have "failover", I don't need syncing every few minutes. In fact, I am willing to absorb the "risk" of only "syncing" once per day ... assuming that my host will be decently reliable.
2) Why is mysql replication necessary? Is Backing up (i.e., tar or rsync) the mysql databases not a good idea or not technically sufficient? (Even if it requires stopping mysql for the few minutes it would take)
3) What about the IP address differences between the two ISPConfigs ... even if I sync them, do I still have to make some config change due to the IP difference before the "Secondary" server could go live? I notice you don't appear to suggest syncing the ispconfigs (/root/ispconfig ?) after the initial setup.

In other words, why not all the steps in this thread, but instead tar the mysql stuff too?

(Don't beat on me too hard, I just want to know why technically I have to use mysql replication even when I want to only do daily backups)

Thanks again for your any feedback.
Reply With Quote
  #4  
Old 4th August 2010, 14:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

If you want to do only dialy backups, then you dont need mysql replication indeed. I thought you wanted to have a failover system with current data.

Regarding /root/ispconfig replication. This directory does not contain any data that changes after initial ispconfig install, so it has not to be replicated.

If you do not switch over the ip address to your backup server in case of a failure, you might have to change ip addresses in the website configurations as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
tester321 (4th August 2010)
  #5  
Old 4th August 2010, 15:40
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Question

Quote:
Originally Posted by till View Post
If you want to do only dialy backups, then you dont need mysql replication indeed. I thought you wanted to have a failover system with current data.
Well, of course, I want that like anyone else ... but I am sizing up what is practical vs. what is needed. I have serious doubts about mysql replication (just from reading) ... I guess it is a "don't knock it 'til you try it" scenario

Quote:
Originally Posted by till View Post
Regarding /root/ispconfig replication. This directory does not contain any data that changes after initial ispconfig install, so it has not to be replicated.
OK

Quote:
Originally Posted by till View Post
If you do not switch over the ip address to your backup server in case of a failure, you might have to change ip addresses in the website configurations as well.
Huh? Didn't quite get this. The DNS failover switches the hostname to the IP (it checks the site's availability every 5 minutes and switches over to the Backup if it appears the Primary is down).

BUT, in the proposed scenario, my current server is on, say:
192.168.100.x
And the new primary will be on (some real IP at a provider)
example: 200.139.149.x

IIRC, even though ISPConfig allows you to put in multiple IPs it actually doesn't have communication or support for multiple servers, right? Will I have to maintain two different ISPConfig setups of all the websites? (Drupal multisites with a bunch of sites on 1 IP using Named-Based Virtual hosting using howtoforge setups)
Reply With Quote
  #6  
Old 4th August 2010, 15:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Quote:
IIRC, even though ISPConfig allows you to put in multiple IPs it actually doesn't have communication or support for multiple servers, right? Will I have to maintain two different ISPConfig setups of all the websites? (Drupal multisites with a bunch of sites on 1 IP using Named-Based Virtual hosting using howtoforge setups)
You should be aware that you try to setup a ultiserver system with a ispconfig version for single servers. ISPConfig 2 is a controlpanel to be used on single servers, so it has no functions to help you to run it on multiple servers at the same time. For multiservers etups, there is ISPConfig 3 available which supports the configuration mirroring out of the box over two or more servers.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
tester321 (4th August 2010)
  #7  
Old 4th August 2010, 15:56
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default Is there an upgrade path from ISPConfig2 to ISPConfig3?

Quote:
Originally Posted by till View Post
You should be aware that you try to setup a ultiserver system with a ispconfig version for single servers. ISPConfig 2 is a controlpanel to be used on single servers, so it has no functions to help you to run it on multiple servers at the same time. For multiservers etups, there is ISPConfig 3 available which supports the configuration mirroring out of the box over two or more servers.
Oh great ... another upgrade :-( lol

I thought I read in threads that I can't upgrade though (i.e., there is no upgrade path) from ISPConfig2 to 3? i.e., I have to install ISPConfig3 from scratch?

Can you please confirm for me? Thanks

So, if no upgrade path, my scenario for the initial setup on ISPConfig3 might be:

1) Install "Perfect Debian" + ISPConfig3 on new host/primary
2) Restore /var/www + mysql backups from current ISPConfig2 server
3) What other major steps?

Last edited by tester321; 4th August 2010 at 15:59.
Reply With Quote
  #8  
Old 4th August 2010, 16:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

I was not talking about a upgarde. ISPConfig 2 and 3 are completely different software packages with a different system requirements. You can not update from ISPConfig 2 to 3.

Quote:
1) Install "Perfect Debian" + ISPConfig3 on new host/primary
2) Restore /var/www + mysql backups from current ISPConfig2 server
3) What other major steps?
You can not simply restore /var/www as the directory structure and users are different. You will have to restore the website contents of every website to the new website directory on the ispconfig 3 system.

But you dont have to switch to ISPConfig 3. I just explained you above that you have selected a controlpanel that does not support multiple servers out of the box. You can run a backup system with ispconfig 2 as well, but you might have to do some manual config changes or switch the IP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 4th August 2010, 16:50
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
Default OK, will stick with ISPConfig2

Till, thanks ... I think the best approach then (to go from a known to a slightly less known) is for me to continue with the current config and maybe do it a slightly different way.

i.e.,
I have more flexibility with the VM anyway, so I am going to adjust the IP of the VM to match the IP of the VPS provider. I can then using natting (internal to the VM) so it and the host/VPS use the same IP.

That way I can keep exactly the same OS/config on both and the DNS failover (which occurs external to both networks btw, I am not using DNS on ipsconfig) will just switch hostnames to the appropriate network/machine.

Internally the OS/settings will be exactly the same -- the VPS will be routing over its true IP, the VM will be routing using that same IP but that IP will be natted internal to the VM and then go out of the physical machine onto the real network/out to the internet.

(And yes, I will try the mysql replication and other sync suggestions you have made. I want these machines to be exactly the same from the OS perspective).

Last edited by tester321; 4th August 2010 at 16:53.
Reply With Quote
  #10  
Old 12th September 2010, 23:26
tester321 tester321 is offline
Member
 
Join Date: Jul 2009
Posts: 34
Thanks: 7
Thanked 2 Times in 2 Posts
 
Default For anyone reading this thread

I finally bit the bullet and setup MySQL replication and it has been working ok (you can see specifics and links to tweaks in this other thread, here).

It doesn't remove my need to do what I mention here, but it will give me more time to figure this out before I add additional bandwidth providers.
Reply With Quote
Reply

Bookmarks

Tags
backup, debian, drupal, ispconfig, perfect

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.