Link to home
Start Free TrialLog in
Avatar of Steven Vona
Steven VonaFlag for United States of America

asked on

Replicate MySQL database once per day

I have a MySQL database that we use for IDS systems.  We would like to create a second database in a remote location and replicate DB1 with DB2.  I found plenty of information about setting up database replication with MySQL, but it seems they are do replication in near real time.

Is there a way I can set up replication to only take place at night?  This would help reduce stress to our WAN link.

Thanks

Both databases would be running on RHEL6.
Avatar of multimac
multimac
Flag of Germany image

You could make an initial dump and play it into the second database server. Then once per day you run "flush logs" and script-copy the latest binary log file  to the second server and import it there.
http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
multimac's solution will also work, but it involves multiple steps including transferring of binary logs.  I see it has one advantage though - once you run the binary logs you know you're done - unlike the master-slave replication where you need to check the status.
Avatar of Steven Vona

ASKER

@joahnntagle,

So I would put those script on the slave server correct?
Yes that's correct.