Backup of vm disk images

Stefan Hajnoczi stefanha at gmail.com
Fri May 1 15:05:47 UTC 2020


On Wed, Apr 22, 2020 at 07:51:09AM +0200, Anders Östling wrote:
> I am fighting to understand the difference between backing up a VM by
> using a regular copy vs using the virsh blockcopy command.
> What I want to do is to suspend the vm, copy the XML and .QCOW2 files
> and then resume the vm again. What are your thoughts? What are the
> drawbacks compared to other methods?

Hi Anders,
The kvm at vger.kernel.org mailing list is mostly for the discussion and
development of the KVM kernel module so you may not get replies.  I have
CCed libvir-list and developers who have been involved in libvirt backup
features.

A naive cp(1) command will be very slow because the entire disk image is
copied to a new file.  The fastest solution with cp(1) is the --reflink
flag which basically takes a snapshot of the file and shares the disk
blocks (only available when the host file system supports it and not
available across mounts).

Libvirt's backup commands are more powerful.  They can do things like
copy out a point-in-time snapshot of the disk while the guest is
running.  They also support incremental backup so you don't need to
store a full copy of the disk image each time you take a backup.

I hope others will join the discussion and give examples of some of the
available features.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200501/e6d800d4/attachment-0001.sig>


More information about the libvir-list mailing list