Database is generally the primary thing you’d want to worry about when doing a snapshot backup of a web hosting system. It’d probably be fine, in the sense that modern databases are quite resilient to things like power outages and such, so it’d probably come back up without problem, but you might lose data (whatever transactions were in progress at the time of the snapshot). Mail could also be an issue. But, if you’re needing to restore a backup, you’re probably expecting to lose some data from the time when the backup was made to when you’re restoring.
I’m all for having multiple forms of backup. Virtualmin backups are safe…they do a dump of the databases, so they’re in a consistent state that’s controlled by the database server itself. But, a snapshot of the whole VM is useful for recovering the whole system exactly as it was (Virtualmin backups do not backup the whole system).
So, go nuts. Keep multiple kinds of backups. It can’t hurt. You’ll be better off than the poor folks who show up here every week asking for help with data lose and not having backups.
@joe thanks, you have confirmed my feelings. snapshots have their place for emergencies and I should use Virtualmin/Webmin backup system for regular backups to be assured they are safe.
Put the databases in a zfs dataset alone with the write parameter set to write immediately. There’s a setting in zfs datasets just for databases. Or for anything else that needs to be written immediately.
Or before you do the snapshot, change the current dataset to write immediately, do the snapshot, then change it back.
There’s a huge performance penalty for it, which is why it’s not the default.
Although I’ve done it your way for years and never had an issue.