Bug 1953939

Summary: incremental backup: RFE: Enable incremental backups
Product: Red Hat Enterprise Linux 9 Reporter: yisun
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED CURRENTRELEASE QA Contact: yisun
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: areis, jdenemar, pkrempa, virt-maint, yalzhang, yisun
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-7.3.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1954631 (view as bug list) Environment:
Last Closed: 2021-12-07 21:57:54 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1954631    
Bug Blocks:    

Description yisun 2021-04-27 08:59:29 UTC
This bug was initially created as a copy of Bug #1799015

I am copying this bug because: 



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 2 yisun 2021-04-27 09:00:58 UTC
incremental backup not enabled by default in rhel9:

(.libvirt-ci-venv-ci-runtest-Ili9u6) [root@dell-per730-59 ~]# virsh list
 Id   Name   State
----------------------
 1    gls    running

(.libvirt-ci-venv-ci-runtest-Ili9u6) [root@dell-per730-59 ~]# virsh backup-begin gls
error: Operation not supported: incremental backup is not supported yet

(.libvirt-ci-venv-ci-runtest-Ili9u6) [root@dell-per730-59 ~]# rpm -qa | grep ^libvirt-7
libvirt-7.0.0-6.el9.x86_64

Comment 5 Peter Krempa 2021-04-28 10:28:43 UTC
*** Bug 1954510 has been marked as a duplicate of this bug. ***

Comment 6 Peter Krempa 2021-04-28 10:29:09 UTC
*** Bug 1954493 has been marked as a duplicate of this bug. ***

Comment 14 yisun 2021-06-17 09:17:38 UTC
Verifed with following version:
libvirt-7.4.0-1.el9.x86_64
qemu-kvm-6.0.0-5.el9.x86_64

1. having a vm without any feature enablement or namespace config
[root@hp-dl385g10-15 ~]# virsh backup-begin avocado-vt-vm1
Backup started

2. start a backup
[root@hp-dl385g10-15 ~]# virsh domjobinfo avocado-vt-vm1 --completed
Job type:         Completed   
Operation:        Backup      
Time elapsed:     5323         ms
File processed:   10.000 GiB
File remaining:   0.000 B
File total:       10.000 GiB

3. create a checkpoint
[root@hp-dl385g10-15 ~]# virsh checkpoint-create-as avocado-vt-vm1 ck1
Domain checkpoint ck1 created

[root@hp-dl385g10-15 ~]# virsh checkpoint-list avocado-vt-vm1
 Name   Creation Time
-----------------------------------
 ck1    2021-06-17 05:09:49 -0400


since this is just to test if incremental backup can be used by default, it can be covered by any test case, no need to add new one, so set qe_test_coverage to '-'


[root@hp-dl385g10-15 ~]# virsh destroy avocado-vt-vm1
Domain 'avocado-vt-vm1' destroyed

[root@hp-dl385g10-15 ~]# qemu-img info /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
image: /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 762 MiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    bitmaps:
        [0]:
            flags:
                [0]: auto
            name: ck1
            granularity: 65536
    refcount bits: 16
    corrupt: false
    extended l2: false