borg icon indicating copy to clipboard operation
borg copied to clipboard

repository: add index query function

Open ThomasWaldmann opened this issue 3 years ago • 1 comments

There are some infos in the repo index which the client might need:

  • chunk size
  • maybe flags

Scenarios:

  • chunks index gets lost on the client side (has id -> refcount, size mapping)
  • chunks index missing size info for some chunks

ThomasWaldmann avatar Aug 21 '22 10:08 ThomasWaldmann

Currently there is:

  • .flags and .flags_many to query and/or set flag values
  • .list also support mask and value now to limit listing to chunks with specific flags

Also there is the option to call repository.get(..., read_data=False) to only return encrypted metadata of the chunk (which includes size, csize, ...), but this is slower than an in-memory index query as it needs to read from the segment file.

ThomasWaldmann avatar Sep 09 '22 22:09 ThomasWaldmann