[pbs-devel] [RFC proxmox-backup] fix #5710: api: backup: stat known chunks during backup
Christian Ebner
c.ebner at proxmox.com
Tue Sep 17 09:23:02 CEST 2024
On 9/16/24 12:17, Gabriel Goller wrote:
> On 13.09.2024 15:59, Christian Ebner wrote:
>> In order to reduce the impact, stat the list of known chunks twice
>> during backup:
>> - during registration of a known chunk
>> - when finishing the backup
>>
>> The first stat is to early on detect missing chunks, the latter
>> assures that all (known and newly registered) chunks are present on
>> the datastore after the backup run.
>>
>> If a missing chunk is detected, the backup run itself will fail and
>> the previous backup snapshots verify state is set to failed.
>> This prevents the same snapshot from being reused by another,
>> subsequent backup job.
>
> I wonder if we need the first option. We could only `stat` the chunks at
> the end of the backup to improve performance.
The first stat is intended to early detect and fail the backup run on
missing chunks, but you are right, to minimize the performance impact
only the final stat when finishing the backup run is enough.
Will drop the first check altogether in a new version of the patch.
More information about the pbs-devel
mailing list