Maqbool Hashim wrote: > Hi, > > I have two radius servers one primary and one backup one, on different > ip addresses. They both have a mysql backend which runs on the same > physical machine. I need the sql database and radius configuration > files to be synchronised periodically (probably every 24hours). I guess > this is a common setup, so I'd appreciate some ideas as to the best way > to achieve this?
By "same physical machine", I assume you mean as the RADIUS daemon that uses it it on and not a 3rd machine that they both use. You want to look at MySQL replication. However, you will either need to do all the writes to just one of the DB's or implement circular replication (something I've never done with MySQL). Once replication is in place, the slave will have any changes from the master almost immediately. We use 2 RADIUS machines and 2 MySQL machines. I have 2 sql instances in the sql.conf file (almost identical except for the hostname). All writes (ie accounting) goes to sql1. Reads are in a failover setup with sql2 first and then sql1 to spread out the load. We also use DNS aliases for the SQL hosts to facilitate manual failover if a DB should go down: SQL1 IN A 1.2.3.4 SQL2 IN A 1.2.3.5 DBMASTER IN CNAME SQL1 DBSLAVE IN CNAME SQL2 If SQL1 goes down, all you need to do is change the DBMASTER to SQL2 and HUP radius. As for syncing the configs between the servers. Take a look at rsync. You will need to HUP radius after you copy new configs over. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html