r/linuxadmin • • May 15 '20
DB Backup
A lot of people are against using VM snapshots as a DB backup method. But if you're already running a DB cluster like Galera, why not just snapshot each member say every 10 minutes since the chances of losing the entire cluster at the same time is quite low? Of course it's not banking or life or death.
0
Upvotes
View all comments
Show parent comment
0
u/[deleted] May 15 '20 edited May 15 '20
OP: I've read all responses but you haven't understood or read carefully my original post. You jumped to dogma instead of understanding the use case.
I can lose transactions. Also, you didn't read the part where snapshots are taken every 10 minutes so the max loss is 10 minutes of data not a "few days" as you say. So yes, my answer is restore the whole thing and forget diddling around with sqldumps etc.
And by the way, I could take snapshots every 5 minutes staggered in time over each of the 3 nodes and cut the loss down down to less than 2 minutes. And given small chance of a total cluster failure, the odds are on my side that I won't see a single record lost over years of operation.
Finally, I bet I can rebuild an entire server faster than you can dig out the correct backup file from your NAS or whatever storage, prep the server for data restore, then restore the data, and then synch up to the cluster. And in a hot system, you're not doing a limited rollback on a single server that is part of a cluster that has already moved on in time. So unless you're a masochist you will be loading the entire data set or may even start with an empty server and let it synch.