Skip to content

Add blob repacking #243

@fd0

Description

@fd0

restic bundles together several blobs into pack files. There are several reasons why blobs aren't referenced any more (e.g. because a snapshot is removed), but it is likely that other blobs in the same pack are still in use, so restic cannot just remove the pack (and all blobs within).

When a garbage-collection process is run manually or more than half of all bytes in a pack aren't referenced, restic should read the remaining blobs and create a new pack. Afterwards, each Index that references blobs in the old pack should be replaced by a new Index which superseds the old one (i.e. lists the storage ID of the old index in the field obsolete), so that all blobs are correctly referenced to the new pack. Once this is done, the superseded Indexes and packs are removed from the repository.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions