5/5/2023 0 Comments Ultimate backup lua![]() You pass the following date and time to the form: ‘ 10:00:00’. Let’s say that you know that the data loss happened on 18th of April, at 10:00:01. It does not guarantee that all of the data will be restored because, even if you are very precise in defining the time, during one second multiple events could be recorded in the binary log. It can be defined within one second resolution. With this option you can pass a date and time, up to which the backup should be restored. Let’s discuss the difference between those two options. You will have two options for that – “Time Based” and “Position Based”. If the backup is compatible with PITR, an option will be presented to perform a Point-In-Time Recovery. For xtrabackup, as long it contains full dataset (you didn’t include just a subset of schemas), it will be PITR-compatible. Such backup has to be full, complete and consistent. First of all, you have to take a backup which is compatible with PITR. So, let us see how to use this feature in ClusterControl. If you use too aggressive binary log rotation, this could become a problem. Second requirement – a host where you take backups from should have all the binary logs required in order to restore to a given point in time. A host where you take backups from has to have binary logs enabled. ![]() Creating Backup Compatible With Point-In-Time Recoveryįirst of all, let’s talk about prerequisites. In this blog post, we will take a look at how ClusterControl can help you perform Point-In-Time Recovery (PITR). As the binlogs store all of the changes, you can also use them to replay traffic. You may know those logs are used for replication – MySQL uses them to store all of the changes which happened on the master, and a slave uses them to replay those changes and apply them to its dataset. Luckily, MySQL has such a mechanism for storing changes – binary logs. If you take a backup at 1:00 am and a table was removed accidently at 11:00 am, you can restore your data up to 1:00 am but what about changes which happened between 1:00 am and 11:00 am? Those changes would be lost unless you can replay modifications that happened in between. Is restoring from backup not enough? What does it have to be point-in-time? We have to keep in mind that a backup is a snapshot of data taken at a given point in time.
0 Comments
Leave a Reply. |