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

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Database synchronisation
keeping databases in sync
magictongue




msg:1579217
 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?

 

mack




msg:1579218
 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.

Mack.

Frank_Rizzo




msg:1579219
 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.

aspdaddy




msg:1579220
 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