Comments on: Flashback: Another Take on Point-In-Time Recovery (PITR) in MySQL/MariaDB/Percona Server https://www.percona.com/blog/flashback-another-take-on-point-in-time-recovery-pitr-in-mysql-mariadb-percona-server/ Sat, 10 Feb 2024 14:51:14 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: James Wang https://www.percona.com/blog/flashback-another-take-on-point-in-time-recovery-pitr-in-mysql-mariadb-percona-server/#comment-10972005 Mon, 30 Mar 2020 12:07:11 +0000 https://www.percona.com/blog/?p=48679#comment-10972005 Thanks a lot.

]]>
By: Shlomi Noach https://www.percona.com/blog/flashback-another-take-on-point-in-time-recovery-pitr-in-mysql-mariadb-percona-server/#comment-10969873 Mon, 29 Oct 2018 11:07:59 +0000 https://www.percona.com/blog/?p=48679#comment-10969873 Thank you for this post! Here is an awk one liner to re-inject @@SESSION.GTID_NEXT into the binary log:


| awk 'BEGIN {"uuidgen -t" |& getline u} /^BEGIN/ {c += 1 ; print "SET @@SESSION.GTID_NEXT= \x27" u ":" c "\x27/*!*/;"} {print}'

This will create a one time, time-based UUID, and inject a SET @@SESSION.GTID_NEXT entry just before a BEGIN statement in the binary log. Range is sequentially running :1:n

Also, this:


| sed -e s/', @@session.check_constraint_checks=1//g'

and so, for example, you would:


cat mysql-bin.000002_flash.bin | awk 'BEGIN {"uuidgen -t" |& getline u} /^BEGIN/ {c += 1 ; print "SET @@SESSION.GTID_NEXT= \x27" u ":" c "\x27/*!*/;"} {print}' | sed -e s/', @@session.check_constraint_checks=1//g' | mysql -h localhost

]]>
By: Scott Noyes https://www.percona.com/blog/flashback-another-take-on-point-in-time-recovery-pitr-in-mysql-mariadb-percona-server/#comment-10969087 Thu, 12 Apr 2018 19:15:15 +0000 https://www.percona.com/blog/?p=48679#comment-10969087 It also will not recover changes made by a cascading foreign key.

]]>