mySQL backup with SQLyog

mySQL backup with SQLyog

am 18.05.2007 23:14:50 von Jason Maur

Hey all,

This is my first post to a newsgroup so forgive
me if it's in the wrong place...

I've setup a local backup server for my company's
website, and can sync the two DB's no problem (the local
and the "interweb" one) with SQLyog. But I'm not sure
if the following is possible and (if so) how to do it:

I sync the local DB with the live DB every morning at
5:00 a.m. Let's say the live site then goes down at
4:00 p.m., so there have been a lot of changes made to the DB
since the last backup. Now, while the live DB is down,
I want to give employees access to the backup DB on the
LAN.

So here's the predicament: how (if possible) can I
guarantee that the changes made to the live DB (from 5am
to 4pm) and the changes made to the backup DB will be
consistent? That is, once the live DB recovers,
I want to be able to take the local DB updates and apply
them to the live DB without losing the updates made on the
live DB since the last backup.

Okay, sorry about the short novel, thanks,

Jason Maur

Re: mySQL backup with SQLyog

am 21.05.2007 15:39:08 von lark

Jason Maur wrote:
> Hey all,
>
> This is my first post to a newsgroup so forgive
> me if it's in the wrong place...
>
> I've setup a local backup server for my company's
> website, and can sync the two DB's no problem (the local
> and the "interweb" one) with SQLyog. But I'm not sure
> if the following is possible and (if so) how to do it:
>
> I sync the local DB with the live DB every morning at
> 5:00 a.m. Let's say the live site then goes down at
> 4:00 p.m., so there have been a lot of changes made to the DB
> since the last backup. Now, while the live DB is down,
> I want to give employees access to the backup DB on the
> LAN.
>
> So here's the predicament: how (if possible) can I
> guarantee that the changes made to the live DB (from 5am
> to 4pm) and the changes made to the backup DB will be
> consistent? That is, once the live DB recovers,
> I want to be able to take the local DB updates and apply
> them to the live DB without losing the updates made on the
> live DB since the last backup.
>
> Okay, sorry about the short novel, thanks,
>
> Jason Maur
this is a perfect scenario for a replication process. in your case,
you'd set up one of your servers (let's say interweb) as the master
replicator and the other one as the slave. every change on master will
be replicated to the slave. the binary logs have to be turned on for
this to work. what happens next is that the master goes down (for
whatever reason), and the slave takes over. it becomes the master by
default. all changes obviously will go to this server. once the real
master is back online, the two servers through a couple of processes
catch up with each other. the result is that you always have two servers
that are mirrors of each other.

--
lark -- hamzee@sbcdeglobalspam.net
To reply to me directly, delete "despam".