I know abouts MySQL's Replication, but i don't think this will help me

This is the situation:

I'm working for a (small) company with 4 offices in different parts of the
country. I've constructed a database in mysql and made an interface in PHP
that should be accessible for all 4 offices. I don't want to do this with a
central server, becauz if the internet connection fails, people can't work.
So i'm gonna provide each office with their own server, all with a copy of
the database. However, during the day i wan't to synchronise those servers a
few times with each other.
I thought of doing this by making a cron job that will dump all the data in
a file and upload it to a central server. The data they work with is
office-specific; each office can read all the data from the other offices,
but only alter/update the data from it's own office. So, the data/dumpfile
being uploaded from a specific office is only the data that that particular
office can update. Once this central server is updated by all four offices
again with a cronjob, i will upload the whole database (a dumpfile ofcourse)
back to each of the four offices.
I've also thought about keeping track of the data that's being
inserted/updated by duplicating the database, so i'll have one filled with
data and one empty one, in which i can keep track of all the insert/update
queries (by writing some extra php-code that will actually keep track of
this, using the second database). I thought this might be faster, since the
dump file will be smaller, however i can also see a lot of extra problems
arise, doing it this way...

My question is, is there anyone who has done something similar and who can
give me some advice? Like, telling me i'm doing it all wrong becuase there
are some things i haven't thought of yet.

I hope you can understand it, i find it difficult to explain and english is
not my native language.

Martijn Korse



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to