Most viewed recipes tagged "master_slave"http://code.activestate.com/recipes/tags/master_slave/views/2011-11-04T14:56:56-07:00ActiveState Code RecipesPurge Mysql binary logs (Python)
2010-01-12T15:14:10-08:00Umang Gopanihttp://code.activestate.com/recipes/users/4172787/http://code.activestate.com/recipes/577004-purge-mysql-binary-logs/
<p style="color: grey">
Python
recipe 577004
by <a href="/recipes/users/4172787/">Umang Gopani</a>
(<a href="/recipes/tags/automate/">automate</a>, <a href="/recipes/tags/binary_logs/">binary_logs</a>, <a href="/recipes/tags/master_slave/">master_slave</a>, <a href="/recipes/tags/mysql/">mysql</a>, <a href="/recipes/tags/purge/">purge</a>).
Revision 8.
</p>
<p>Being a MySQL DBA , one faces a common issue in replication environment -> Disk space issue on master, since the number of binary logs have increased.
Now, one of the solution to this would be using expire_logs_days parameter in your mysql config file.
But what if, the slave is lagging by few hours or if the slave is broken since few days and the binary logs are removed due to the parameter set. Whenever the salve comes up, it will go bonkers, knowing that the binary log where it last stopped no more exists.</p>
<p>I faced this issue a couple of time until I decided to automate it using a script. Herewith I am attaching a python script which can run regularly in cron.</p>
Script for GAE Blobstore migration from Master Slave to High Replication Datastore (Python)
2011-11-04T14:56:56-07:00Tomáš Rampashttp://code.activestate.com/recipes/users/4179816/http://code.activestate.com/recipes/577941-script-for-gae-blobstore-migration-from-master-sla/
<p style="color: grey">
Python
recipe 577941
by <a href="/recipes/users/4179816/">Tomáš Rampas</a>
(<a href="/recipes/tags/appengine/">appengine</a>, <a href="/recipes/tags/blobstore/">blobstore</a>, <a href="/recipes/tags/gae/">gae</a>, <a href="/recipes/tags/hrd/">hrd</a>, <a href="/recipes/tags/master_slave/">master_slave</a>, <a href="/recipes/tags/migration/">migration</a>, <a href="/recipes/tags/python/">python</a>).
Revision 20.
</p>
<p>This code helped me with blobstore content migration of my GAE app from M/S storage to HRD. Prerequisite for this is copying data located in Masterslave datastore to HRD first so they exist on both Datastores.
Be aware pls, that this migration script has impact on outgoing and incoming bandwidth of your apps so it affects your GAE resources utilization.</p>