From: Howard Hart Date: November 25 2008 8:36pm Subject: Re: Mysql and Flashback List-Archive: http://lists.mysql.com/mysql/215370 Message-Id: <492C61C6.7070000@ooma.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit slave lag should be easy to do with a simple bash script. i.e. - desired_delay=3600 # one hour lag while sleep 60 do behind=`mysql -u root --password=foobar -e "show slave status\G" | grep 'Seconds_Behind_Master:' | awk '{ printf "%s\n", $2 }'` if [ $behind < $desired_delay ]; then mysql -u root --password=foobar -e "slave stop" holdtime=`expr $desired_delay - $behind` if [ $holdtime -gt 0]; then mysql -u root --password=foobar -e "slave stop" fi else mysql -u root --password=foobar -e "slave start" fi done Not pretty, but should do the job with more sanity checks, with the caveat that sometimes Seconds_Behind_Master can return some interesting values.... Howard Hart Ooma, Inc. ewen fortune wrote: > Hi Shain, > > If you are using InnoDB its possible to patch to allow this functionality. > > Percona are in the early stages of developing a patch specifically to > allow flashback type access to previous table states. > > https://bugs.launchpad.net/percona-patches/+bug/301925 > > If you wanted to go down the slave lag road, Maatkit has a tool for doing that. > > http://www.maatkit.org/doc/mk-slave-delay.html > > Cheers, > > Ewen > > On Tue, Nov 25, 2008 at 6:57 PM, Shain Miley wrote: > >> Hello, >> We are planning on trying to do an Oracle to MySQL migration in the near >> future. The issue of a Mysql equivalent to Oracle's flashback was being >> discussed. After some digging it appears that there is no such feature in >> Mysql. One thought that I had was to do some intentional replication lag >> (say 12 to 24 hours)...that way if we needed to revert back we would have >> the option of doing so. >> >> Does anyone: >> >> a: know how to setup a replication to intentionally lag? >> >> b: know of a better way of engineering a flashback equivalent for Mysql? >> >> Thanks in advance, >> >> Shain >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: http://lists.mysql.com/mysql?unsub=ewen.fortune@stripped >> >> >> > >