Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using the binary log for incremental backups


The binary log is a series of files that store the events that modify the data. It is used for incremental backups and for replication. The purpose of the binary log is being able to apply the changes again to a database. In the case of replication, its use is intuitive: the binary log events are sent by the master to the slaves, so that they can apply the same changes and always mirror the master's data (not necessarily immediately). Replication cannot work if the binary log is not enabled.

In the case of backups, the binary logs files are used as incremental backups. If a disaster happens, the data can be restored to the most recent and complete backup. It can be a physical or a logical backup. After that, the data will probably be a bit old. However, if the binary log is used, more recent incremental backups could exist. They contain changes that can be sent to the server, so that they are applied to the complete backup.

An example will make...