Skip to content

Add adjustable utilization threshold for re-writing packs during prune #1985

@teknynja

Description

@teknynja

Output of restic version

restic 0.9.2 compiled with go1.10.3 on linux/amd64

What should restic do differently? Which functionality do you think we should add?

Currently during a "prune" operation, restic will re-write any pack that contains any unused data. This can trigger a lot of read/write operations as it has to read the data from every affected pack and then write that data back to the backend. This can become expensive on metered backends.

I would like to see an option to the prune command that allows the user to specify the amount of unused space allowed in a pack before it is re-written. Setting this option to 0% would cause packs with any amount of unused data to be re-written (the current behavior), whereas setting this option to 100% would only re-write packs that are completely unused.

Note this feature was originally suggested as part of a broader discussion in issue #1470 Parallelize prune pack rewrites.

What are you trying to do?

Adding this feature would give the user some degree of control over how much read/write traffic is generated by a prune operation, with the trade-off being how much unused data is left behind in the repository.

Did restic help you or made you happy in any way?

I discovered restic like many others after CrashPlan discontinued their "Home" plan and I needed to find a suitable alternative. restic was the perfect fit, allowing me to choose different backend services as well as being a command line based utility, which allows me to run it easily on my headless server. I have been recommending it since to friends and co-workers. Thanks! 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions