I'm writing a shell script using the concept of binary logs for point in time recovery.
Now, the scenario is such that a full-backup will happen every alternate day and Incremental backup should be done in between.
Suppose full-backup happens on Monday and Wednesday, incremental backup should happen on Tuesday.
For point in time recovery, I'm using mysqlbinlog --starttime --stoptime binary-logs > backup.sql
In the shell script I need to use starttime and log position of the previous full-backup to specify the log files in the statement, how can I retrieve this in a shell script and record the changes done during that time.
Is there anyway I can do this, please help me in this regard.
Best Answer
You can use https://sourceforge.net/projects/mysqlincrementalbackup/ script. Description from its website: