Go to file
Fiona Ebner 98209f99a1 backup: implement backup for external providers
The state of the VM's disk images at the time the backup is started is
preserved via a snapshot-access block node. Old data is moved to the
fleecing image when new guest writes come in. The snapshot-access
block node, as well as the associated bitmap in case of incremental
backup, will be made available to the external provider. They are
exported via NBD and for 'nbd' mechanism, the NBD socket path is
passed to the provider, while for 'file-handle' mechanism, the NBD
export is made accessible via a file handle and the bitmap information
is made available via a $next_dirty_region->() function. For
'file-handle', the 'nbdinfo' and 'nbdfuse' binaries are required.

The provider can indicate that it wants to do an incremental backup by
returning the bitmap ID that was used for a previous backup and it
will then be told if the bitmap was newly created (either first backup
or old bitmap was invalid) or if the bitmap can be reused.

The provider then reads the parts of the NBD or virtual file it needs,
either the full disk for full backup, or the dirty parts according to
the bitmap for incremental backup. The bitmap has to be respected,
reads to other parts of the image will return an error. After backing
up each part of the disk, it should be discarded in the export to
avoid unnecessary space usage in the fleecing image (requires the
storage underlying the fleecing image to support discard too).

[WB: - instead of backup_vm_available_bitmaps call
       backup_vm_query_incremental, which provides a bitmap-mode
       instead, pass this along and use just the storage id as bitmap
       name]
[FE: Move construction of $devices parameter to after sizes are
     available. They were undef before.
     Adapt to changed backup-access QMP interface not requiring an
     explicit bitmap name anymore.]

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Link: https://lore.proxmox.com/20250404133204.239783-14-f.ebner@proxmox.com
2025-04-06 20:18:52 +02:00
debian d/control: bump versioned dependency for pve-edk2-firmware-ovmf 2025-04-03 21:23:20 +02:00
PVE backup: implement backup for external providers 2025-04-06 20:18:52 +02:00
qemu-configs move qemu-configs to own directory 2019-09-24 18:59:35 +02:00
qmeventd fix #5714: fix calloc parameter ordering 2024-09-23 10:30:01 +02:00
query-machine-capabilities add pve prefix to query-machine-capabilities.service 2024-11-18 21:56:15 +01:00
test machine: bump pve machine version and reverse the s3/s4 defaults 2025-04-06 19:08:31 +02:00
vm-network-scripts firewall: add handling for new nft firewall 2024-04-19 20:09:20 +02:00
.gitignore gitignore: sort content 2023-11-17 15:54:24 +01:00
bootsplash.jpg add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
bootsplash.xcf add seabios bootsplash and use it 2016-09-08 12:22:01 +02:00
Makefile add C program to get hardware capabilities from CPUID 2024-11-17 18:37:03 +01:00
modules-load.conf remove unnecessary init.d, postint, postrm and qmupdate scripts 2015-02-27 16:09:41 +01:00
qm convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00
qmextract remove legacy sparsecp 2017-08-23 10:03:37 +02:00
qmrestore convert qmrestore into a PVE::CLI class 2015-10-05 13:10:24 +02:00