We have a MariaDB Database (10.3 v) on a virtual Redhat server. I should create a LVM-Snapshot script to secure our data. We use a kind of technolgy that it secures our storage. It means if the hard disk fails, there will be no problem with the data. The data will be saved almost simultaneously on several other disks.

But for a failure or crash and fast restore we need a LVM-Snapshot (running every night).

My main question is: Should I secure (snapshot) our binlogs too or not? and Why?

As far as I know, even if the database crashes for any reason, the binlogs will not be lost or corrupted.

Thanks in advance.

  • 2
    Presumably, if you have binary logs enabled, you find some value in them, so it would make sense to protect them.
    – mustaccio
    Aug 22, 2022 at 13:49
  • What failure(s) do you want to protect against? Flood destroying all your computers? Single disk failure? MySQL server aborting? Accidental "DROP DATABASE"? Disgruntled employee?
    – Rick James
    Aug 23, 2022 at 4:15
  • Not physical. It's more about data like server aborting, server crash, disgruntled employee and etc.
    – TimLer
    Aug 23, 2022 at 6:00
  • Does this answer your question? Can it be safe to disable binary logging in MySQL?
    – John K. N.
    Aug 23, 2022 at 7:06

1 Answer 1


It is a good practice to keep a backup (including binlog as well).

As per the part even if the database crashes for any reason, the binlogs will not be lost or corrupted there is still an open ticket MariaDB binlog corruption when "No space left on device" and stuck session killed by client which isn't solved yet.

Another part which I recommend is protecting the binlog (even if it isn't directly related to the question)

Overview of the Binary Log

It is important to protect the binary log, as it may contain sensitive information, including passwords.

You can encrypt it by using Encrypting Binary Logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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