Hacker News new | ask | show | jobs
by derekp7 2247 days ago
This works except in the case where your backups include live database files (where you put the database in extended logging mode, back up the data files while they are being modified, then back up the logs).

I haven't found a good way to verify these without doing a full database restore and seeing if the logs apply cleanly, along with having the DB do internal checks.

1 comments

Isn't this use case solved by snapshotting the volume, then backing up the snapshot? Since the snapshot captures the filesystem state at a point in time, any database that's crash-tolerant should be fine. Snapshotting is natively supported on Windows and Macs, not sure about linux.
> Snapshotting is natively supported on Windows and Macs, not sure about linux.

JFTR, this is supported on Linux as well and, especially when using LVM, is quite simple and straightforward.

You can do it manually [0,1] or using tools made for just this purpose, such as mylvmbackup [2] (which should be available in most distribution's package repositories).

---

[0]: https://www.badllama.com/content/mysql-backups-using-lvm-sna...

[1]: https://www.percona.com/blog/2006/08/21/using-lvm-for-mysql-...

[2]: https://www.lenzg.net/mylvmbackup/