<div dir="ltr"><div class="gmail-s-prose gmail-js-post-body">
                
<p>Normally when I backup a kvm machine I shutdown the machine then run:</p>
<pre><code>virsh list -all
virsh shutdown Ubuntu18
virsh dumpxml Ubuntu18 > /MyBackup/Ubuntu18.xml
cp /var/lib/libvirt/images/Ubuntu18.qcow2 /MyBackup/Ubuntu18.qcow2
</code></pre>
<p>However, I found a new sub-command. The help file says:</p>
<pre><code>% 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
</code></pre>
<p>The problem with this help is, it is not clear enough.</p>
<p>I understand that I should use <code>virsh backup-begin vm1</code> to backup a live kvm machine. However, this command only create <code>.qcow2</code> files. What about the <code>.xml</code> file.</p>
<p>What does <code>--backupxml</code> , <code>--checkpointxml</code> & <code>--reuse-external</code> actually do? </p><p>When should I use them?</p></div></div>