tags:

views:

49

answers:

2

Hi,

How can we make one database restore date to date, like "sunday to wednesday" but from one binlog file?

Thanks,
Pedro

+2  A: 

You can use mysqlbinlog. To specify start and end dates, use the --start-datetime and --stop-datetime arguments; they are documented on the mysqlbinlog page in the MySQL Manual.

James McNellis
+1  A: 

You need to first restore your last full backup which was before the point you want to restore to. Then replay the binlogs from that point (The backup should probably have been created containing the binlog position - if not you'll have to try to work it out) up to the point you want to restore to.

MarkR