Randy Smith wrote:
On Sunday 30 October 2005 14:28, Marc Perkel wrote:
  
Ajay Sharma wrote:
    
Marc Perkel wrote:
      
[snip]
  
How does everyone else deal with this?
        
Have you looked into MySQL replication?

http://dev.mysql.com/doc/refman/5.0/en/replication.html

I have a master/slave setup and the slave is there for two reasons:

1) nightly dumps
2) emergency backup.

So every night, the database is locked and we do a full mysqldump on
every database.  Once the lock is removed, the slave sync's back up
with the master.

If the master dies then we can switch all of our machines to start
using the slave until the master comes back online.  It's not
automatic, but it won't take too long.

--Ajay
      
Thanks - I'll look ast it. Is it hard to set up? Does it require all
databases sysc or can you set them up individually?
    

It's not hard to setup through I've had problems with the AWL and Bayes tables 
breaking periodically. Doing a full mysqldump nightly as suggested above 
should help with that.

To control fail-over, we use a pair of Gentoo boxes and ipvs to do load 
balancing and fail-over. SA talks to the virtual IP which points to the 
primary box or fails over to the back up if the primary is down. (Note: I am 
not currently using AWL or Bayes so the 2nd server is read-only. You can get 
around this by using a chained replication thing so A->B->A but that can be 
hairy to setup.)

  

Yeah - I'm looking to keep it simple so if the main server fails it will do a reasonably good job until it comes back up.
-- 
Marc Perkel - [EMAIL PROTECTED]

Spam Filter: http://www.junkemailfilter.com
    My Blog: http://marc.perkel.com

Reply via email to