Using point-in-time recovery with binlog files
MySQL Server is able to write all the changes made to data inside a database to a binary log file (binlog
for short). A binary log (binlog
) is a file written by the database server that contains all the changes made to the data, which is stored inside the database server in a specific timeframe. This is called a binary log because the changes are recorded in a binary format as opposed to a text-based format. The logs with changes can be used for multiple purposes. One of them is to stream them to a second server to keep it updated. Then, the second server can be used as a standby in case the primary server fails, or the second server can be used to offload heavy read-only queries such as reporting. But these binlog
files can also be used to replay changes made to the database between the time of the last backup and the time of the restore point (the point just before something disastrous such as a drop table
command happened).
For this...