Score:0

How to backup a bare-metal Ubuntu server with MySQL running 24/7 with zero downtime?

ru flag

I've been researching this for a long time but I cannot find a satisfying solution. People tend to:

  1. Backup Linux systems with rsync - which is good if you want to backup a lot of standalone files but not if you want to backup and eventually restore and entire bare-metal server. Additionally, my MySQL databases have 100GB+ in size and are open 24/7 so there isn't any consistent state other than a point-in-time snapshot.

  2. Backup Linux systems with Clonezilla is also great for imaging and recovery from standalone hard drives but not really suitable for 24/7 running systems.

What I am looking for is an equivalent of Windows' Volume Shadow Service (VSS) that can backup a running system at any point in time in a consistent state.

My closest idea is to use LVM and an LVM snapshot, backup the LVN snapshot and merge the snapshot with the main partition right after the snapshot. Is this a viable option? If there's any tool that makes this safe and automated (can be commercial) I'm happy with that, too.

waltinator avatar
it flag
Ubuntu 14.04 has passed its End-of-life date, and is no longer supported on AskUbuntu.
in flag
If you are running 14.04, this would be an opportune moment to convince senior management to allow an upgrade to 20.04 so that you can use ZFS and make snapshots as often as you’d like. ZFS snapshots could then be moved to an offsite location with ease. ZFS replication is something else that you may be interested in.
adamsfamily avatar
ru flag
Sorry guys, wrong tag, current version it's 18.04 - but I will be installing a new machine anyway so let's assume we have the newest version possible. Is a zero-downtime backup solution available?
adamsfamily avatar
ru flag
@matigo Is the ZFS snapshot and replication considered to be a good practice for continuous backup?
in flag
ZFS operations are not backups in and of themselves. It’s what you do with them that make the technologies useful. You will likely still want to have a dedicated server configured as a MySQL replicated instance from where you make daily and/or hourly backups
adamsfamily avatar
ru flag
In that case the solution could be installing 1) Proxmox VME on the bare metal and 2) convert the MySQL Ubuntu server into a VM as Proxmox can do snapshoted backups of the VMs on the fly. I was however hoping for at least a commercial software for Ubuntu for on-the-fly backup :(
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.