Backup and dedupe a VM with LUKS

Nov 27, 2023
270
72
33
Netherlands
daniel-doggy.com
Hello everyone,

I am current planning on adding LUKS to a VM that I also use as a desktop to access my internal VMs.
I would think/asume that dedupe for the VM on PBS would still work with LUKS encryption apart from that it can only dedupe with its own data from its own disk.
But does anyone know if this is a correct assumption or is dedupe of a VM completely lost when adding LUKS to a VM?
 
  • Like
Reactions: Johannes S
But does anyone know if this is a correct assumption
Well..., I did not verify this actively, but: yes.
or is dedupe of a VM completely lost when adding LUKS to a VM?
The backup process will copy the content of the virtual harddisk into the backup system. Whether the raw disk is encrypted or not should be completely irrelevant. At the end the virtual disk is allowed to contain any theoretically possible data.

The most part of the encrypted content will stay the same today, tomorrow, next week. Correct? (Except of the small amount of data which is modified during normal usage, of course.)

You've mentioned the only drawback already: "...apart from that it can only dedupe with its own data".
 
  • Like
Reactions: Johannes S
Thanks for the info.

I would indeed assume that only my first backup is as big as the disk itself. (Since debian by default writes garbage to the disk before adding LUKS to prevent old data leaking.)
And after that just small updates as things change on the disk.
I would also think that PBS would not care about the disk being a LUKS but given that it not common to do LUKS on a VM, it never hurts to ask. :)
And besides that we also have single file restore but that would 100% not work with LUKS. (But also here a clear difference between will not work and it breaks your backup as the feature creating compatibilty issues.)
 
Last edited:
  • Like
Reactions: Johannes S