I have written a shell script for point in time recovery using binary logs( Point-in-Time Recovery Using Event Times). I'm using the start time as the previous full-backup start time and end time will be to the current time.
I used the below command for point in time recovery.
mysqlbinlog -debug --start-datetime="$STARTTIME" --stop-datetime="$STOPTIME" $file > /tmp/test.sql
$file consists of the list of log files created from start time to end time.
But, in test.sql I see that the backup has happened from a different time to current time. Why is this happening. What should be done to get the .sql file from the particular start time. Here starttime was
How can I get exact details of changes from start time to end time.
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #130222 17:30:01 server id 1 end_log_pos 107 Start: binlog v 4, server v 5.5.28-log created 130222 17:30:01 BINLOG ' wV0nUQ8BAAAAZwAAAGsAAAAAAAQANS41LjI4LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;