I'm trying to create incremental backups that I could restore when necessary. All backups are being generated fine but I couldn't find a way to recreate an image using all or some of the backup files.

For example, my domain is called jammy and is running.

jammy-backup.xml:
<domainbackup>
  <incremental></incremental>
</domainbackup>

jammy-checkpoint.xml
<domaincheckpoint>
  <disks>
    <disk name="vda" checkpoint="bitmap"/>
  </disks>
</domaincheckpoint>

~# virsh backup-begin jammy jammy-backup.xml jammy-checkpoint.xml

* This command with these files generates backup file in /var/lib/libvirt/images appending the checkpoint timestamp in file name (jammy.qcow2 -> jammy.qcow2.TIMESTAMP).

~# virsh checkpoint-list jammy
 Name         Creation Time
-----------------------------------------
 1666006874   2022-10-17 08:41:14 -0300
 
~# ls -lh /var/lib/libvirt/images
-rw-r--r-- 1 libvirt-qemu kvm  2,6G out 18 14:38 jammy.qcow2
-rw------- 1 root root         1,5G out 17 08:41 jammy.qcow2.1666006874

If I create a new domain using jammy.qcow2.1666006874 as disk, everything works good.

Then, I've created some incremental backups.

jammy-backup.xml:
<domainbackup>
  <incremental>1666006874</incremental>
</domainbackup>

~# virsh backup-begin jammy jammy-backup.xml jammy-checkpoint.xml

~# ls -lh /var/lib/libvirt/images
-rw-r--r-- 1 libvirt-qemu kvm  2,6G out 18 14:38 jammy.qcow2
-rw------- 1 root root         1,5G out 17 08:41 jammy.qcow2.1666006874
-rw------- 1 root root         247M out 17 14:42 jammy.qcow2.1666010735

At this point, if I need to restore the backup with checkpoint 1666010735, how can I create a new image using jammy.qcow2.1666010735 and jammy.qcow2.1666006874? 

I would like to merge the incremental backup jammy.qcow2.1666010735 into the full backup jammy.qcow2.1666006874, to get a new image so I can create a new domain using it as disk. Am I doing it the right way?

Ubuntu 22.04 LTS
KVM
libvirt 8.0.0-1ubuntu7.1
qemu 1:6.2+dfsg-2ubuntu6.4

Thank you! 

--
Jorge Luiz Corrêa
Embrapa Agricultura Digital

echo "CkpvcmdlIEx1aXogQ29ycmVhCkFu
YWxpc3RhIGRlIFJlZGVzIGUgU2VndXJhbm
NhCkVtYnJhcGEgQWdyaWN1bHR1cmEgRGln
aXRhbCAtIE5USQpBdi4gQW5kcmUgVG9zZW
xsbywgMjA5IChCYXJhbyBHZXJhbGRvKQpD
RVAgMTMwODMtODg2IC0gQ2FtcGluYXMsIF
NQClRlbGVmb25lOiAoMTkpIDMyMTEtNTg4
Mgpqb3JnZS5sLmNvcnJlYUBlbWJyYXBhLm
JyCgo="|base64 -d

__________________________
Aviso de confidencialidade

Esta mensagem da Empresa  Brasileira de Pesquisa  Agropecuaria (Embrapa), empresa publica federal  regida pelo disposto  na Lei Federal no. 5.851,  de 7 de dezembro de 1972,  e  enviada exclusivamente  a seu destinatario e pode conter informacoes  confidenciais, protegidas  por sigilo profissional.  Sua utilizacao desautorizada  e ilegal e  sujeita o infrator as penas da lei. Se voce  a recebeu indevidamente, queira, por gentileza, reenvia-la ao emitente, esclarecendo o equivoco.

Confidentiality note

This message from Empresa  Brasileira de Pesquisa  Agropecuaria (Embrapa), a government company  established under  Brazilian law (5.851/72), is directed exclusively to  its addressee  and may contain confidential data,  protected under  professional secrecy  rules. Its unauthorized  use is illegal and  may subject the transgressor to the law's penalties. If you are not the addressee, please send it back, elucidating the failure.