Re: [gentoo-user] Apache & Mysql Backup System

2005-01-28 Thread Kashani
Seunghyun. Cho wrote:
I am running apache/php and Mysql on my gentoo server. I just backup
tar copies everyday. When the system is down, it is very difficult
to recover it. So I'd like to make automatic backup(or load
ballancing) system for my site.
How can I implement this on gentoo machine. One is main web&db 
server. and there is second server sync data in real time. When main
server is down, second server should do the job of main server. And
data needs to be backuped in realtime(or everyday... real time 
syncing is much better~)

Is anybody implemeted this? Give me some ideas...
You've got a few options depending on how much money you have.
1. No shared storage
	Setup a cron to rsync your Apache dir every X minutes to your second 
machine. Assuming you're not changing content that often, it would be 
easier if you had your dev machine, assuming you use one, sync to both 
servers whenever you push content live. Running frequent rsyncs over 
large data sets can bog your server down.
	Mysql replication is incredibly simple these days as long as you're 
doing it in one direction. Probably take you 30 minute total to set it 
up. The hard part is switching back to the primary. You don't want that 
to happen automatically since the primary will not have the latest data. 
Do some reading on this as you'll really need to know what going on.
	Run HA scripts or daemons, etc on the two servers. There are a number 
of packages around that do some simple heartbeat stuff. Again some 
reading as which one you chooses affects what you can do.

2. Shared storage
	This requires some significant cash. You hook both servers up to a 
happy little RAID 5 array. All data is stored on the array. Run your 
heartbeat scripts and you're pretty much set. You'll need to do a bit 
more reading about Mysql as you'll NEVER want both Mysql's trying to 
update the data at the same time.

	And now the caveats. If you are allowing users to upload pictures and 
content that doesn't get jammed into the db, doing the first solution is 
going to suck as you'll need to push the content around pretty quick. 
Also in the second solution if your storage goes down, you are 
completely down. HA scripts can get a little funky sometimes. Make sure 
you're on a switch, with normal ether cards, and have mature drivers. 
This will go a long way towards making things more stable. Lastly you 
can always spend a lot more money then this with hardware load 
balancers, storage with multiple heads, dedicated db servers, etc, but 
these two options seemed to be closer to what you were looking for.

kashani
--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] Apache & Mysql Backup System

2005-01-28 Thread Chris Boot
Hi,
If I'm not mistaken, this has been done and is in constant use on big 
sites like SourceForge and the like. I'm not sure of the details of the 
operation, but I seem to remember reading an overview about it on the 
site somewhere. They do, however, have lots of money to burn on load 
balancers. While there are free solutions to do this sort of thing, I 
don't know about them.

I suggest reading up on the MySQL docs to find out how to set up the 
MySQL side of things. As for Apache, it might be harder without a 
dedicated piece of kit to decide which server to send packets to. If the 
only problem you're having is Apache / MySQL crashing, you chould have a 
look at monit, which does a great job of restarting services that fall 
over and can notify you of what's happening by email.

HTH,
Chris
Seunghyun. Cho wrote:
Hi,
I am running apache/php and Mysql on my gentoo server.
I just backup tar copies everyday.
When the system is down, it is very difficult to recover it.
So I'd like to make automatic backup(or load ballancing) system for my site.
How can I implement this on gentoo machine.
One is main web&db server. and there is second server sync data in real
time.
When main server is down, second server should do the job of main server.
And data needs to be backuped in realtime(or everyday... real time
syncing is much better~)
Is anybody implemeted this?
Give me some ideas...
Thanks.
--
gentoo-user@gentoo.org mailing list
 



smime.p7s
Description: S/MIME Cryptographic Signature


[gentoo-user] Apache & Mysql Backup System

2005-01-28 Thread Seunghyun. Cho
Hi,

I am running apache/php and Mysql on my gentoo server.
I just backup tar copies everyday.
When the system is down, it is very difficult to recover it.
So I'd like to make automatic backup(or load ballancing) system for my site.

How can I implement this on gentoo machine.
One is main web&db server. and there is second server sync data in real
time.
When main server is down, second server should do the job of main server.
And data needs to be backuped in realtime(or everyday... real time
syncing is much better~)

Is anybody implemeted this?
Give me some ideas...

Thanks.

--
gentoo-user@gentoo.org mailing list