2

A greeting fellow, I would like to know if in MySQL (I understand that all engines must have), you can recover from damage to the database using some kind of file "journal" transactions, if so, what is that file? What is the correct procedure to recover it ?. I know that I can recover it from the * .frm files present in /var/lib/mysql, but I would also like to know this other option. And if someone dominates the subject, I will appreciate your comments.

0

The MySQL binary log is what you are looking for. Aside from being used for replication, because it stores a range of writes executed on the server, it can be used for point in time recovery.

You will need some kind of regular starting point in case of recovery (such as a full backup), and then you can use the binary logs and mysqlbinlog to roll forward to an arbitrary point in time (e.g. just before an accidental table drop). So they won't substitute backups but can complement them nicely.

Some people was able even to use them to roll back actions under specific circumstances and configuration.

  • How much effort is needed, in RAM or processor use, the systematic realization of Binary Log's in MySQL? Example: Every 5 minutes – Franco Ugarte Nov 29 '18 at 22:22
  • A rule of thumb is that the binlog takes less than 10%, of the server resources for writes- or almost negible for not the highest write concurrencies dimitrik.free.fr/blog/archives/2018/05/… but it is normally worth it. – jynus Nov 30 '18 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.