backup – Incremental Backup qcow2 Image with rsync

backupincremental-backupqcow2rsyncvirtual-machines

I use rsync to backup the qcow2 disks of my virtual machines. However, I would like to be able to get an incremental backup so that I don't have to copy the entire disk every time.
for now I use rsync -hav --progress / source / target, the execution time is always the same even if the second time the disk has already been copied and it should take much less

UPDATE

doing some additional research I discovered the existence of bitmaps:
https://wiki.qemu.org/Features/IncrementalBackup
https://qemu.readthedocs.io/en/latest/interop/bitmaps.html#overview
which should make it possible to perform an incremental backup of a qcow2 disk, however I don't know the correct procedure and the topic in general is not entirely clear to me. is there anyone who knows the subject better who can help me?

Best Answer

I know this is late, but can be useful for others.

rsync is an invaluable tools to reduce network transfers, but it does not reduce required disk bandwidth for changed files with default settings as it first copies the entire file, then it applies the required changes and finally it renames the temp file to the original name.

You can try with --inplace to avoid the intermediate copy, but be aware that rsync is not particularly efficient with very big files.

If it does not prove to be the right tool, you can try something as bdsync or blocksync.

Even better, if your filesystem support it (read: if you are using btrfs or zfs), you can send/recv it for true differential backups.