Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
How will you be making your "incremental" backup? – Michael - sqlbot Feb 21 '13 at 23:00
@Michael-sqlbot Incrementalbackup happens using mysqlbinlog. The log files and start time and end time are calculated from last backup. – Rudra Feb 22 '13 at 6:33

1 Answer 1

You can use script. Description from its website:

A complete incremental backup for MyISAM and InnodB in a mix environment for those applications use both of engines simultaneously using binary logs and a method that does not affect running database. There is no need to stop or lock the database, It does utilize only binary logs to extract update queries of databases. This tools uses automysqlbackup script as part of solution for its full backup.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.