[pbs-devel] [PATCH v8 proxmox-backup 46/69] client: implement prepare reference method

Christian Ebner c.ebner at proxmox.com
Tue Jun 4 14:45:57 CEST 2024


On 6/4/24 11:24, Fabian Grünbichler wrote:
> On May 28, 2024 11:42 am, Christian Ebner wrote:
>> Implement a method that prepares the decoder instance to access a
>> previous snapshots metadata index and payload index in order to
>> pass it to the pxar archiver. The archiver than can utilize these
>> to compare the metadata for files to the previous state and gather
>> reusable chunks.
> 
> I think either here or when downloading the previous manifest would be a
> good place to implement a check for changing encryption mode from "none"
> to "encrypted", since that invalidates any previous reference that would
> otherwise exist?
> 
> currently it is broken and not caught by anything else. i.e., I can
> enable encryption from one snapshot to the next while still re-using
> unencrypted injected chunks.. the resulting snapshot is then unusable,
> since the *reader* actually enforces only reading encrypted chunks if
> the manifest says so..
> 
> for "regular" backups, this wasn't an issue, since the chunks cannot
> collide and be re-used. it still might be an optimization to also
> skip "none" -> "encrypted" manifests in general, since they are useless
> in that case anyway.
> 

I added an additional parameter passing the current crypt mode to the 
`prepare_reference` method in order to compare this to the crypt mode as 
provided in the `FileInfo` for the reference payload obtained via the 
manifest. When mismatched, this is logged and no reference is used for 
that run.





More information about the pbs-devel mailing list