Use the user-configured name of the bitmap when merging the appropriate
bitmaps for an excremental backup so that the user can see it as
configured. Additionally expose the default bitmap name if nothing is
configured.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_backup.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 54e726ca4a..795026d24b 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -322,7 +322,10 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
return -1;
if (incremental) {
- dd->incrementalBitmap = g_strdup_printf("backup-%s",
dd->domdisk->dst);
+ if (dd->backupdisk->exportbitmap)
+ dd->incrementalBitmap = g_strdup(dd->backupdisk->exportbitmap);
+ else
+ dd->incrementalBitmap = g_strdup_printf("backup-%s",
dd->domdisk->dst);
if (qemuBackupDiskPrepareOneBitmaps(dd, actions, incremental,
blockNamedNodeData) < 0)
@@ -368,6 +371,10 @@ static int
qemuBackupDiskPrepareDataOnePull(virJSONValuePtr actions,
struct qemuBackupDiskData *dd)
{
+ if (!dd->backupdisk->exportbitmap &&
+ dd->incrementalBitmap)
+ dd->backupdisk->exportbitmap = g_strdup(dd->incrementalBitmap);
+
if (qemuMonitorTransactionBackup(actions,
dd->domdisk->src->nodeformat,
dd->blockjob->name,
--
2.23.0