KVM Guests Backup - CentOS7
-
What's the best way to backup KVM Guests on CentOS 7?
-
@aaronstuder I strongly suggest you to use the same software you use for phisical machines, an agent-based backup software.
I heard that there is something by acronis for full-vm backp, but is not that widespread.
Trust me, every method that you can find on the net use a combination of qcow or lvm snapshot… and they both aren't good for serios backup.
Snapshot in qcow are not ok because you must retain all the snapshot chain on the backup storage AND on your main storage, and you can't do the merge of the oldest ones. Performance wise, they are also not as good as LVM.LVM snapshot are weird if you want to export it in another storage.
Maybe the best solution is to take full backup of the VMs every month, and use the agent-based backup for files, db etc.
Big installation (where KVM shine!) don't use angentless backup, they just rely on their infrastructure-as-code toolchain to rebuild the environmente and on agent-based backup for data.
-
I can recommend the Veeam for Linux agent. The free one works rather well.
Edit: AFAIK, it works on Physical or Virtual machines.
-
@Francesco-Provino said in KVM Guests Backup - CentOS7:
@aaronstuder I strongly suggest you to use the same software you use for phisical machines, an agent-based backup software.
Snapshot in qcow are not ok because you must retain all the snapshot chain on the backup storage AND on your main storage, and you can't do the merge of the oldest ones. Performance wise, they are also not as good as LVM.
That's not how snapshots work... you don't take a snapshot as a backup, you take a snapshot so the backup system can make it's copies while the system being backed up goes about it's business.
LVM snapshot are weird if you want to export it in another storage.
Of course it seems weird. You don't export a snapshot, you make a copy of the full disk.
-
@dafyre Would you backup the host or each VM?
-
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre Would you backup the host or each VM?
I would do each VM. Once done, it's set it & check it every now and again to make sure it works.
-
@dafyre I need to learn a config management package.... suggestions?
-
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre I need to learn a config management package.... suggestions?
SaltStack.
The Python way is THE way. -
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre I need to learn a config management package.... suggestions?
I'll have to defer to others for that one, lol.
-
@Francesco-Provino What about puppet, anisble, etc?
-
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre Would you backup the host or each VM?
I want to say that you never backup the host - but who knows.. you might want to backup the host config so if it dies you can quickly rebuild it.
One of the manage advantages of hypervisors is that the host doesn't really matter. if it dies, you spin up another box, install your hypervisor in it, do some quick configuration - set IP, build vSwitches, etc and then restore your VMs.
-
@aaronstuder said in KVM Guests Backup - CentOS7:
@Francesco-Provino What about puppet, anisble, etc?
I've tried to get puppet working several times, but never get right. Over-complicated, and I dislike the DSL language.
Salt is simpler and easier, and better than Ansible IMHO. I don't like the Ansible push-mode, is slow and tracking issues is hard. -
@aaronstuder said in KVM Guests Backup - CentOS7:
What's the best way to backup KVM Guests on CentOS 7?
No simple answer. Backups don't work that way. There are three really popular approaches, all of which have tons of merit:
- Agentless / Host backups. This uses KVM and it's storage layer to take a backup of the device. This is super popular on VMware because of its native change block tracking. Not so popular on other hypervisors because they lack this (but might add it, Hyper-V is just adding it now.)
- Agent Based / Guest backups. These are the traditional backups we've used for years. Treat the VMs just like physical devices. This is the most popular for KVM.
- DevOps style. Use scripts or agents to backup only the core data on a box and only backup VMs that have changing data on them like databases or file servers, no backups of all of stateless systems like application servers.
-
@Francesco-Provino said in KVM Guests Backup - CentOS7:
@aaronstuder said in KVM Guests Backup - CentOS7:
@Francesco-Provino What about puppet, anisble, etc?
I've tried to get puppet working several times, but never get right. Over-complicated, and I dislike the DSL language.
Salt is simpler and easier, and better than Ansible IMHO. I don't like the Ansible push-mode, is slow and tracking issues is hard.Ansible will pull, too. But I am liking Salt a lot, too. And a friend of ours is one of the Salt developers.
-
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre Would you backup the host or each VM?
Each VM. Each workload is unique, they each have unique needs (most of the time.)
-
@dafyre said in KVM Guests Backup - CentOS7:
@aaronstuder said in KVM Guests Backup - CentOS7:
@dafyre I need to learn a config management package.... suggestions?
I'll have to defer to others for that one, lol.
Salt and Ansible seem to be the most interesting. We are getting into Salt, here. Chef is decent.