View Full Version : Rsync between DA DA servers
martexx
03-21-2007, 11:54 AM
I would like to know the costs of someone
ho can setup a mirror of my server (without exim) wich is updated with rsync )or something like it)
I will then make dns changes so that if one server is down the other will be called upon.
this has to include mysql copy
rldev
03-21-2007, 02:30 PM
Let me know what you come up with. I would like to do this as well.
IMO
I dont think there is any simple way to just rsync one directadmin server to another server, change the dns records over there we go, its off working again.
Its probably alot more complex than this.
martexx
03-25-2007, 07:47 AM
The dns would be managed thru the multiple server setup in DA maybe?
jlasman
03-25-2007, 11:42 AM
It's more complex than you'd think.
I've just finished reading a rather long article:
Publication: Linux User and Developer
Website: http://www.linuxuser.co.uk/
Issue: 70
Article: The show goes on
Page: 74
At the end of the article I realized there's still at least one point of failure.
Though the article isn't freely available on their website, a pdf copy of issue 70 is available. Though it does cost a bit, I consider it recommended reading.
And once you've read it, come back here :) to discuss the issue of having an exact duplicate of the server for when it goes down.
Jeff
hostpc.com
03-25-2007, 08:54 PM
We've been rsync'ing our servers for over a year now, twice daily - haven't encountered any issues.
We've been rsync'ing our servers for over a year now, twice daily - haven't encountered any issues.
So you have had to fail over and its just worked ?
I dont see how considering the server's dns entries, ip addresses etc.. are all different.
martexx
03-26-2007, 01:30 AM
Well if it is not such a big problem..
Can you explain to me how you did it?
Maybe then i could do it to
hostpc.com
03-26-2007, 07:46 AM
So you have had to fail over and its just worked ?
I dont see how considering the server's dns entries, ip addresses etc.. are all different.
It's basically a hot spare computer, it can be rebooted to the same IP as the failed one, OR it can be edited with a few perl -pi -e scripts to update the DNS entries in /var/named/*.db, /usr/local/directadmin/scripts/ipswap.sh , etc - it's not an out of the box solution, but it will work.
__co__
03-27-2007, 03:50 PM
enlighten us with code .. :)
I'm very interested in how you do this exactly.
martexx
03-28-2007, 03:07 AM
Yes sir! the same here :)
could you shine a light in the tunnel of darkness?
hostpc.com
03-28-2007, 08:39 PM
Well, I could tell you, but then I'd have to acquire/shoot/mame you. :)
Rsync is pretty easy,
From the backup server,
rsync -a -e ssh IP:/directory/to/backup /copy/of/orginal/directory
so if you were rsync'ing the mysql directories
rsync -a -e ssh IP:/var/lib/mysql/ /var/lib/mysql
the rest unfortunately, I can't share with you as it's code we developed, and I'm not interested in releasing it to the general populous at this time
hostpc.com
03-28-2007, 09:19 PM
After thinking about this for a while, I've decided that I'll work on releasing a set of scripts to emulate what we do, for the betterment of the community. I'll put it on my to-do list, and let everyone know when it's completed. It will take me a while, there's a number of other things on my plate right now, but I will release it.
I'll announce in the appropriate forum when it's ready
martexx
03-29-2007, 12:50 AM
That would be SUPER cool,
rsyncing a directory like /usr/local/directadmin gives some problems dont you agree?
i believe that you can do an rsync of that dir if you rule out some information like ip numbers and stuff
hostpc.com
03-29-2007, 06:31 AM
That would be SUPER cool,
rsyncing a directory like /usr/local/directadmin gives some problems dont you agree?
i believe that you can do an rsync of that dir if you rule out some information like ip numbers and stuff
In our situation, no - we're rebuilding data to a new box that will take a new IP once it's rebooted - so IP's and config will stay exactly the same as the old box
If you dont have the luxury of a new box on standby, yes, we've got an alternate set of scripts that just copy the portable data to rebuild user data - NOT directadmin
martexx
03-29-2007, 07:04 AM
well since nobody needs DA on a fallback that would be perfect.
I got an VPS wich i can use for this job
Manie
05-10-2007, 04:16 AM
How is this proceeding?
I'm building a redudnant system for a colocated customer as well.
2 servers, 1 as a hot spare.
But I'm not sure if I should copy all the user data, or if there is a way to copy all the directadmin content to the hotspare.
Any insights?
martexx
05-10-2007, 04:43 AM
There is no progress at my side so far.
i have an empty vps on my hands to do the fallback but is is not configured yet.
i still dont know how to do this
Manie
05-10-2007, 05:01 AM
I go and play with it this weekend.
I got the 2 servers linked up on a 10.0.0.* IP with crosscables, I however don't have directadmin installed yet. (the servers are at the office, not at the datacenter yet. )
what besided of the IP's will give troubles you think?
fwpeter
05-10-2007, 05:59 AM
There is no progress at my side so far.
i have an empty vps on my hands to do the fallback but is is not configured yet.
i still dont know how to do this
Take a look at LVS (www.linuxvirtualserver.org). Quite simple to set up and works like a charm. I prefer using the localhost solution so you don't need an extra server just for the routing. Good luck!
will-lo
05-11-2007, 12:21 PM
i've been using a 4 servers setup, 2 DA, 2 storage mounted via NFS (/home and some common dirs) to build a redundant system for a customer. Shell script has to be written to sync user between 2 DA frontend. and Rsync the 1st NFS to 2nd NFS every hour.
This setup worked great and provide good redundancy. Going to add 5th/6th server to run heartbeatd for load balancing in the coming month.
It's complex setup. =/
Last month, one of the DA frontend downed due to hw failure and service wasn't interrupted cuz of this.
bclark94
05-11-2007, 03:26 PM
If you have two identical machines. You can rsync /home /var /usr/local/directadmin
I been working on transferring my data from one machine to another because of a hard drive controller issue. My problem is I don't have identical hardware I am also going from fc1 to fc6
In my case I have been using rsync for /home, /usr/local/directadmin/data, /var/spool/mail/, and /var/lib/mysql. I did use DA's 'backup' to get the needed files in /etc. I did run into some issues that I haven't work out yet.
In the case of mirroring a computer I would set up the backup server to boot on runlevel 2 or 4 and turn off all start up programs except ssh, but diffenatly need to make sure startips does not start or you might knock off your dedicated IPs with conflicts.
When needed edit /etc/sysconfig/network change your IP and change runlevels to 3 which would be a normal boot. (You would need to change inittab to 3 in case the machine reboots)
alexander007
11-27-2007, 09:28 PM
Any more info on this? This exactly what I want to do...I have a server with DA and a spare with all the data from the server that have DA....but how automatically this servers starts to work when the firts goes down?
I would like to play with this as well.
Timmm
05-18-2008, 04:44 AM
i've been using a 4 servers setup, 2 DA, 2 storage mounted via NFS (/home and some common dirs) to build a redundant system for a customer. Shell script has to be written to sync user between 2 DA frontend. and Rsync the 1st NFS to 2nd NFS every hour.
This setup worked great and provide good redundancy. Going to add 5th/6th server to run heartbeatd for load balancing in the coming month.
It's complex setup. =/
Last month, one of the DA frontend downed due to hw failure and service wasn't interrupted cuz of this.
Will-lo, could you share more information about how you did this? and what's your ns-setup?
Thanks!
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.