Skip to content

borg2: avoid doing an unnecessary rebuild of the index #8476

Description

@ThomasWaldmann

Note: updated for situation WITH packs.

For high-latency stores (sftp: and a lot of what's available via rclone:) a full index rebuild needs to list all objects in all packs in the store and there are potentially a lot of objects. This is slow as it needs to scan over each pack file - only borg check --repair-index shall do that.

Most commands will use the existing chunks index. Most commands only add objects, so they will just write an additional partial index to index/sha256(partial_index) with just the new index entries.

For borg create:

  • it's not a big problem if the index does not have all objects that exist in the repo. If that happens, borg create will just store something to the repo that's already there.
  • it would be a severe problem though if the index would falsely say "we have that object" and borg would not store it to the repo. the archive would then reference a non-existing object.
  • similarly it is fatal if the index points to a wrong pack_id

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions