Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does mysql replication supports delayed sync if remote slave server is OFF?

For example I want to make my developing server have a fresh copy of databases each morning.

It should be partial sync, not full copy of databases each morning.

And synchronization should be only ONE way, not duplex, to avoid deleting something of master server.

What utilities are out there or native functionality of mysql itself?

Thanks!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can setup master-slave mysql replication. You can stop the slave whenever you want, and then start it again to make your slave up-to-date. The following mysql commands can be used:

> slave stop;
> slave start;
share|improve this answer
    
So when I'll launch slave start, it will automatically fill local slave databases ONLY with missing entries, not the full database copy right? Thanks btw :) –  Somebody Apr 7 '12 at 11:33
    
It should copy the pending changes only. –  Khaled Apr 7 '12 at 11:37
    
That's very good. :) –  Somebody Apr 7 '12 at 11:40
add comment

mysql replication can work with interruptions but it makes sense only if there'll be no changes to the database content on the the dev-box. is it the case? if not - it'll be better if you either:

  • make a full dump on the production and recover it on the test [mysqldump will come handy]

or

  • use a tool like pt-table-sync to intelligently synchronize the content from production to the test without transferring all the data [this makes sense only if your database has larger size]
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.