Normally when I backup a kvm machine I shutdown the machine then run:
virsh list -all
virsh shutdown Ubuntu18
virsh dumpxml Ubuntu18 > /MyBackup/Ubuntu18.xml
cp /var/lib/libvirt/images/Ubuntu18.qcow2 /MyBackup/Ubuntu18.qcow2
However, I found a new sub-command. The help file says:
% virsh backup-begin --help
NAME
backup-begin - Start a disk backup of a live domain
SYNOPSIS
backup-begin <domain> [--backupxml <string>] [--checkpointxml
<string>] [--reuse-external]
DESCRIPTION
Use XML to start a full or incremental disk backup of a live
domain, optionally creating a checkpoint
OPTIONS
[--domain] <string> domain name, id or uuid
--backupxml <string> domain backup XML
--checkpointxml <string> domain checkpoint XML
--reuse-external reuse files provided by caller
The problem with this help is, it is not clear enough.
I understand that I should use virsh backup-begin vm1 to backup a live kvm
machine. However, this command only create .qcow2 files. What about the .xml
file.
What does --backupxml , --checkpointxml & --reuse-external actually do?
When should I use them?