forked from TrueCloudLab/restic
c1a3de4a6e
Add a callback to the PruneOptions struct which calculates the number of bytes allowed to be unused after prune is done. This way, the logic is closer to the option parsing code. Also, add an explicit option `unlimited` for the use case when storage does not matter but bandwidth and time do. Internally, this sets the maximum number of unused bytes to MaxUint64. Rework the documentation slightly so that no more "packs" are mentioned and it talks about "files" instead. Make it clear in the documentation that the percentage given to `--max-unused` is relative to the whole repository size after pruning is done. If specified, it must be below 100%, otherwise the repository would contain 100% of unused data, which is pointless. I had a hard time coming up with the correct formula to calculate the maximum number of unused bytes based on the number of used bytes. For a fraction `p` (0 ≤ p < 1), a repo with `u` bytes used, and the number of unused bytes `x` the following holds: x ≤ p * (u+x) ⇔ x ≤ p*u + p*x ⇔ x - p*x ≤ p*u ⇔ x * (1-p) ≤ p*u ⇔ x ≤ p/(1-p) * u |
||
---|---|---|
.. | ||
_static | ||
images/aws_s3 | ||
logo | ||
man | ||
.gitignore | ||
010_introduction.rst | ||
020_installation.rst | ||
030_preparing_a_new_repo.rst | ||
040_backup.rst | ||
045_working_with_repos.rst | ||
050_restore.rst | ||
060_forget.rst | ||
070_encryption.rst | ||
075_scripting.rst | ||
080_examples.rst | ||
090_participating.rst | ||
100_references.rst | ||
110_talks.rst | ||
bash-completion.sh | ||
cache.rst | ||
conf.py | ||
design.rst | ||
developer_information.rst | ||
faq.rst | ||
index.rst | ||
Makefile | ||
manual_rest.rst | ||
requirements.txt | ||
REST_backend.rst | ||
test_irreducibility.gap | ||
zsh-completion.zsh |