Bug 1799015 - incremental backup: RFE: Enable incremental backups by default
Summary: incremental backup: RFE: Enable incremental backups by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
: 1803602 (view as bug list)
Depends On: 1207659 1790482 1799010 1799011 1799013 1804593 1811906 1812100 1812531 1812827 1813310 1814573 1817327 1862472 1867085 1930757
Blocks: 1909197
TreeView+ depends on / blocked
 
Reported: 2020-02-06 13:22 UTC by Peter Krempa
Modified: 2021-05-25 06:41 UTC (History)
16 users (show)

Fixed In Version: libvirt-7.0.0-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 06:41:21 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Krempa 2020-02-06 13:22:36 UTC
Description of problem:
The incremental backup feature is currently marked as experimental as it doesn't intergrate well with few other features. After all required bits are present we should enable to use it without requirements for any XML-based hacks.

Comment 1 Peter Krempa 2020-02-17 15:07:00 UTC
*** Bug 1803602 has been marked as a duplicate of this bug. ***

Comment 2 yisun 2020-02-19 04:41:19 UTC
Hi Peter,
The xml to enable the whole function should be as follow, correct?

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
…
  <qemu:capabilities>
    <qemu:add capability='incremental-backup'/>
  </qemu:capabilities>
…

Any other configurations? thx

Comment 3 Peter Krempa 2020-02-19 09:41:48 UTC
Yes, that override allows you to use the checkpoint and backup APIs with following caveats:

- checkpoints resinding in backing files can't be deleted
- block copy/block stream messes up the bitmaps
- manual overlay/snapshot creation prohibits backups
- live migration doesn't migrate bitmaps

(possible others, see bugs this BZ depends on)

Please don't hesitate to file bugs for problems in the existing code I'll review whether it makes sense.

Comment 4 Nir Soffer 2020-08-19 16:44:51 UTC
Peter, is this expected in 8.3? The bug have many dependencies. Should we
plan to have this in 8.3 or this will be too risky?

Comment 5 Peter Krempa 2020-08-20 13:27:50 UTC
If you look closely, all the dependencies are already fixed. In fact I need to add two more probably to accurately reflect what's required. This bug was designed to be a tracker, but will also be used to include the code to enable incremental backups.

Comment 6 Peter Krempa 2020-08-20 13:31:05 UTC
Adding dependencies since we need to ensure that backups work after non-shared-storage migration (this can't be fixed later) and blockdev-reopen is made stable in qemu.

Comment 10 Peter Krempa 2021-02-22 15:28:29 UTC
Upstream enables the incremental backup feature once 'blockdev-reopen' becomes stable by:

commit 013e7564ff568a4b16240f8598fba90130dbe932
Author: Peter Krempa <pkrempa>
Date:   Wed Oct 16 13:57:49 2019 +0200

    qemu: capabilities: Enable QEMU_CAPS_INCREMENTAL_BACKUP
    
    For incremental backup we need QEMU_CAPS_BLOCKDEV,
    QEMU_CAPS_BLOCKDEV_REOPEN, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING.
    
    Signed-off-by: Peter Krempa <pkrempa>
    Reviewed-by: Jiri Denemark <jdenemar>

For downstream this commit itself will be enough since we have a downstream capability enabling blockdev-reopen.

Comment 15 yisun 2021-02-24 08:34:10 UTC
Hi Peter,
With latest rhelav libvirt, the backup cannot start without any setting

[root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7
libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64

[root@dell-per740-18 ~]# virsh domstate vm1
running

[root@dell-per740-18 ~]# virsh domblklist vm1
 Target   Source
--------------------------------------------------------
 vda      /var/lib/libvirt/images/jeos-27-x86_64.qcow2

[root@dell-per740-18 ~]# virsh backup-begin vm1
error: Operation not supported: incremental backup is not supported yet


And backup can start with comment 2 settings

Comment 16 Peter Krempa 2021-02-24 09:16:28 UTC
(In reply to yisun from comment #15)
> Hi Peter,
> With latest rhelav libvirt, the backup cannot start without any setting
> 
> [root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7
> libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64
> 
> [root@dell-per740-18 ~]# virsh domstate vm1
> running
> 
> [root@dell-per740-18 ~]# virsh domblklist vm1
>  Target   Source
> --------------------------------------------------------
>  vda      /var/lib/libvirt/images/jeos-27-x86_64.qcow2
> 
> [root@dell-per740-18 ~]# virsh backup-begin vm1
> error: Operation not supported: incremental backup is not supported yet
> 
> 
> And backup can start with comment 2 settings

Did you use qemu which includes the patches from:

https://bugzilla.redhat.com/show_bug.cgi?id=193075

?

Comment 17 yisun 2021-02-24 09:40:16 UTC
(In reply to Peter Krempa from comment #16)
> (In reply to yisun from comment #15)
> > Hi Peter,
> > With latest rhelav libvirt, the backup cannot start without any setting
> > 
> > [root@dell-per740-18 ~]# rpm -qa | grep ^libvirt-7
> > libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64
> > 
> > [root@dell-per740-18 ~]# virsh domstate vm1
> > running
> > 
> > [root@dell-per740-18 ~]# virsh domblklist vm1
> >  Target   Source
> > --------------------------------------------------------
> >  vda      /var/lib/libvirt/images/jeos-27-x86_64.qcow2
> > 
> > [root@dell-per740-18 ~]# virsh backup-begin vm1
> > error: Operation not supported: incremental backup is not supported yet
> > 
> > 
> > And backup can start with comment 2 settings
> 
> Did you use qemu which includes the patches from:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=193075
> 
> ?

I guess you meant bz1930757?

Comment 18 Peter Krempa 2021-02-24 09:58:23 UTC
Oops, yes. I messed up copy&paste. sorry for that

Comment 21 yisun 2021-03-08 09:37:19 UTC
Verified with:
libvirt-7.0.0-8.module+el8.4.0+10233+8b7fd9eb.x86_64
qemu-kvm-5.2.0-10.module+el8.4.0+10217+cbdd2152.x86_64

1. do a backup job WITHOUT any special configs in vm's xml (can refer to comment 2)
(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domstate avocado-vt-vm1
running

(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh backup-begin avocado-vt-vm1
Backup started

(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1
Job type:         Unbounded   
Operation:        Backup      
Time elapsed:     3656         ms
File processed:   2.217 GiB
File remaining:   7.783 GiB
File total:       10.000 GiB

(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# ll /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2*
-rw-r--r--. 1 qemu qemu  863633408 Mar  8 04:35 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
-rw-------. 1 qemu qemu 1050738688 Mar  8 04:35 /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2.1615196130

(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1
Job type:         None        

(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domjobinfo avocado-vt-vm1 --completed
Job type:         Completed   
Operation:        Backup      
Time elapsed:     24762        ms
File processed:   10.000 GiB
File remaining:   0.000 B
File total:       10.000 GiB

2. check the hypervisor's capabilities(.libvirt-ci-venv-ci-runtest-ON1D6O) [root@dell-per730-61 domain]# virsh domcapabilities | grep backup -i
    <backup supported='yes'/>

Comment 24 errata-xmlrpc 2021-05-25 06:41:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2098


Note You need to log in before you can comment on or make changes to this bug.