Add Dirtybimap persistent = true to the BackupProvider Plugin (pve-storage-plugin-examples)

ProxKen

New Member
Sep 25, 2024
9
0
1
Hi all,
I’m working on testing a backup plugin in backup-provider-directory. I have built and installed the plugin successfully, but I noticed that the dirty bitmap persistent field is set to false. It looks like this setting is controlled by an internal Proxmox script.
I would like to set the dirty bitmap persistent field to true. How can I achieve this?
 
Hi,
could you provide more details? What exactly does not work compared to existing backup mechanisms on Proxmox VE? Note that persistent dirty bitmaps only works for qcow2 files natively, but Proxmox VE also supports using raw-formatted images. See also https://bugzilla.proxmox.com/show_bug.cgi?id=3233
 
Hi @fiona ,
I want to test the external backup provider (backup-provider-directory), but when I run the vzdump backup on my VM (qcow2 disk). I just see the plugin auto create an dirty-bitmap (snapshot-access:mydirtest) with persistent = false (query by qmp-shell command), how to configure on my external backup provider to change the persistent = true by default?

{
"name": "snapshot-access:mydirtest",
"recording": true,
"persistent": false,
"busy": false,
"granularity": 4194304,
"count": 4194304
}
Thank you
 
Last edited:
You can't change this right now, but it's also not necessary for the current supported functionality. While the VM is running or migrated, bitmaps will keep track and be migrated too. Only after terminating the QEMU process outside of migration, the bitmap will be re-created. Please see the bug report for more context.
 
Thank you. How about we create a dirty-bitmap the same name snapshot-access:mydirtest before running the vzdump command for backing up? E.g. block-dirty-bitmap-add
 
That would be a hack as it's making assumptions about implementation details of the QMP backup handler. And please be very aware of point 2 from https://bugzilla.proxmox.com/show_bug.cgi?id=3233#c6 ! If it's just for qcow2, then I think it should be implemented properly in Proxmox VE and the QMP backup handler, so that it works for all file-based storages.

You still haven't mentioned what exactly you would like to achieve with the persistent dirty bitmap? The same as bug #3233 or something else?