Welcome to WebmasterWorld Guest from 54.158.36.59

Forum Moderators: open

Message Too Old, No Replies

Database synchronisation

keeping databases in sync

     
12:19 am on Oct 13, 2005 (gmt 0)

10+ Year Member



Not sure if this is the right forum for this question. A friend of mine is interested in keeping databases in sync. One database is on a remote server and the other is on his Windows PC. He needs to automatically update the database on his PC whenever the remote server database is updated. Is there any software or script to keep two databases like this in sync?
5:01 am on Oct 13, 2005 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If the DB in question is Mysql then mysql replication may be a viable solution.

The principle is you set the remote server as master, you then set up the local system as a slave. The master creates binnary files that record changes. The system is then able to see differences between the master and slave and will replicate any changes.

Mack.

9:39 am on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How often does the database change? How big is the database?

Replication is fine but it does have it's draw backs.

What you may want to consider is a simple backup / dump script which you can run, say every 24 hrs.

1. Server DB runs a backup script via cron job overnight and zips it.
2. Each morning windows PC downloars the zip file
3. Windows database is dropped and reloaded with the backup data.

It all depends on the size and frequency as to which method is the most practical.

6:14 pm on Oct 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To kep it in sync I'd use merge replication. Its low overhead because it only replicates the changes, even works over standard ADSL.

But if you really want them in sync, Why bother with the local db at all? just connnect to the single db

 

Featured Threads

Hot Threads This Week

Hot Threads This Month