homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Database synchronisation
keeping databases in sync

10+ Year Member

Msg#: 88 posted 12:19 am on Oct 13, 2005 (gmt 0)

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?



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

Msg#: 88 posted 5:01 am on Oct 13, 2005 (gmt 0)

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.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 88 posted 9:39 am on Oct 13, 2005 (gmt 0)

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.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 88 posted 6:14 pm on Oct 13, 2005 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved