[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] dirty bitmap restore procedure
From: |
Michael Ablassmeier |
Subject: |
[Qemu-block] dirty bitmap restore procedure |
Date: |
Tue, 29 Nov 2016 15:13:13 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
hi there,
im currently playing with incremental backups using the dirty-bitmap
feature (2.7.91 (v2.8.0-rc1-dirty)
My steps as follows (without making use of qemu agent or such):
1) create base image for live system
qemu-img create -f qcow2 disk1.imgc 5G
2) boot, create filesystem, mount, touch /mnt/FULL, sync
3) create snapshot via QMP:
blockdev-snapshot-sync device=ide0-hd0 snapshot-file=snapshot-full.img
4) backup original disk via cp
cp disk1.img full-backup_1.img
5) commit back:
block-commit device=ide0-hd0
At this point for my understanding i should have
created a sufficient full backup.
Now im adding a dirty bitmap to the very same disk:
1) create bitmap
block-dirty-bitmap-add node=ide0-hd0 name=INC
2) copy some files to the filesystem, sync
3) issue backup to inc file from very same bitmap, wait for job to finish:
drive-backup device=ide0-hd0 target=inc-backup.1.img sync=incremental
bitmap=INC
the inc-backup.1.img now contains my changed data blocks as
far as i can see.
after this i shutdown the virtual machine and remove my
original disk. Now i wonder how to restore the system
to its last state. Currently im using something along those
lines:
1) create new disk with backing device for full backup:
qemu-img create -f qcow2 -b backup-full.img disk1.img 5G
2) rebase disk to the inc backup:
qemu-img rebase backup-full.img -b inc-backup.1.img
if booting the system i can now see my fileystem which contains
all changes done prior to the snapshot and the full backup,
but i dont see any changes applied from the INC backup, i tried
commiting etc but it just does not work. Im sure i miss something
here, can anyone give me a pointer?
thanks,
- michael
- [Qemu-block] dirty bitmap restore procedure,
Michael Ablassmeier <=