virtnbdbackup and virtnbdrestore: differential backups #34
Replies: 6 comments 20 replies
-
Quick shot implementation for backup in this branch: https://github.com/abbbi/virtnbdbackup/tree/diffbackup |
Beta Was this translation helpful? Give feedback.
-
Hi, I tried the 0.44 and the 0.45 from the diffbackup branch and I have the following problems:
The relevant logs: FULL: FIRST DIFF: SECOND DIFF: Kind regards, |
Beta Was this translation helpful? Give feedback.
-
NM,the -q option allways queries all changed blocks, because its not passing a bitmap to the qemu command. |
Beta Was this translation helpful? Give feedback.
-
ok, found the issue. Zeroed blocks were not written to the stream format if backup type is diff, .. thats why the resulting images were broken. Summary:
|
Beta Was this translation helpful? Give feedback.
-
Hi, I'm using the master from yesterday (0.47) at the moment with diffs against one full backup, really happy with it, thanks for implementing this feature! The only point left is the need to reshuffle the diffs a bit if you don't want to restore the last diff, but that's a minor inconvenience. Because it isn't a chain like with the incrementals, it isn't a problem to (re)move some diffs to get the one you want. Kind regards, |
Beta Was this translation helpful? Give feedback.
-
btw, check out the BitmapSyncMode parameter of blockdev-backup command: https://qemu-project.gitlab.io/qemu/interop/qemu-qmp-ref.html#qapidoc-422
|
Beta Was this translation helpful? Give feedback.
-
Hi abbbi,
I opened the issue regarding the differential backup, I experimented a little further with the differential backup and I found a way to make differential backups, although it isn't a nice way.
I first made a full backup (checkpoint virtnbdbackup.0) and secondly a incremental backup (checkpoint virtnbdbackup.1). I now remove the virtnbdbackup.1 checkpoint with "virsh checkpoint-delete X virtnbdbackup,1". Furthermore I had to remove the checkpoint virtnbdbackup.1 from the checkpoint directory, else virtnbdbackup complaints it can't redefine the .1 checkpoint. Now I can make another incremental backup with "virtnbdbackup -d X -l inc -o Y -c virtnbdbackup.0" where Y is the dataset directory used for the full and first incremental. Virtnbdbackup now creates a .2 checkpoint (it iterates from the .cpl file) and the parent becomes .0, because libvirt doesn't have another checkpoint.
I have tested it with adding and deleting files in the VM and result is as expected, I used virtnbdrestore to recreate the disk files and mounted them after connecting with qemu-nbd.
I have three problems with this method:
So it's possible to make differential backups, although as long as libvirt doesn't have a way to use the parent option it won't be a very nice way.
Kind regards,
Stefan
Beta Was this translation helpful? Give feedback.
All reactions