Guide · Backups & recovery

Backups and disaster recovery for KVM virtual machines.

LexiVirt keeps three kinds of copy, each for a different failure: recovery points next to the disks for a fast way back, backups off the node for when the node is gone, and an export for a copy you carry elsewhere.

By · Checked against LexiVirt 2.1 on

Which copy protects against what

CopyTakenSurvives the node?
SnapshotWith the VM offNo — same disk
Recovery pointOn a schedule, while the VM runsNo — kept next to the disks
BackupOn a schedule, into a repository on NFSYes — off every node
ExportBy hand: one .lexivirt.tar fileYes, once copied elsewhere

Recovery points on a schedule

  1. Open Backups and choose New policy.
  2. Give it a Name, choose how often to Take a recovery point (hourly to weekly) and how many to Keep the newest.
  3. Tick the VMs covered and Save. Protection by VM shows which VMs are protected and when each last ran.
  4. To take one by hand, choose Take one now under Recovery points in the VM's tools; to restore, use the restore button next to it.

With the QEMU guest agent answering, a recovery point is application-consistent — the guest flushes and freezes its filesystems first; without it, crash-consistent. Each one is labelled as which.

Backups off the node

  1. Add an NFS storage container to hold the repository (see storage).
  2. In Backups, choose New backup plan: give a Name, Back up into that container, how often to Run and how many to Keep per VM.
  3. Keep Read every new backup back and check it (recommended) ticked.

Backups are stored in 4 MiB chunks kept once, so each run writes only what changed and VMs installed from the same image share their data; running VMs are copied as they run. Every chunk of a new backup is read back and checked against its hash, and a damaged backup is a critical alert. Restore… makes a new VM, with its UEFI variables and TPM, on any node that reaches the repository.

Export a VM to a file

Export in the VM's tools writes the whole VM to one .lexivirt.tar in the image library; follow it on Tasks and copy the file wherever you keep copies. Import on the Virtual Machines page brings it back, on the node you choose and under a new name if you want.

Back up the console itself

Accounts, nodes, the audit log and the signing key live with the console. Keep a copy of these — they cannot be regenerated:

PathHolds
/opt/lexivirt/data/Accounts, nodes, audit log, signing key
/etc/lexivirt/The cluster secret and the TLS certificate

Before every version change the console also saves a snapshot of its own code and keeps the last five; Updates restores one without reaching the update server.

Limits to know

LimitsRecovery points die with their node; backups are what survives it. Verifying a backup checks every chunk, not that the restored guest boots — restore one now and then and boot it. The repository is one copy on one NFS server, not encrypted at rest. Fencing and backups were tested against simulated hosts, not yet on real servers.

Go further

The capability behind this guide: Storage for KVM Virtualization. Every console page with its limits: the feature reference. Stuck? Ask the community or get support.

Run it on your own servers.

Free, with no licence per VM, socket or core. One command per server.