Specifying Positions for Recovery

Specifying Positions for Recovery

Specifying Positions for Recovery
Instead of specifying dates and times, the –start-position and –stop-position options for mysqlbinlog can be used for specifying log positions. They work the same as the start and stop date options, except that you specify log position numbers rather than dates. To determine the position numbers, run mysqlbinlog for a range of times Using following command.
mysqlbinlog –start-date=[start_date] –stop-date=[stop_date] /var/log/mysql/bin.122 > /tmp/mysql_position.sql
From mysql_position.sql, we can find position for stopping and resuming the recovery.Positions are labeled as log_pos followed by a number.After restoring the previous backup file, use the following command to recover up to the position.
mysqlbinlog –stop-position=”368312″ /var/log/mysql/bin.1223 | mysql -u root -p

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.