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: Lneburg, Germany
Posts: 37,045
Thanks: 841
Thanked 5,661 Times in 4,468 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: Lneburg, Germany
Posts: 37,045
Thanks: 841
Thanked 5,661 Times in 4,468 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: Lneburg, Germany
Posts: 37,045
Thanks: 841
Thanked 5,661 Times in 4,468 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 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 10:54.


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