restic/doc
Alexander Neumann c1a3de4a6e Refactor max-unused calculation, add unlimited option
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
2020-11-03 16:42:21 +01:00
..
_static docs: switch to gopher favicon 2020-02-13 00:09:37 +01:00
images/aws_s3 Update AWS S3 tutorial, fixing #1593 2018-01-29 20:47:27 +01:00
logo Update logo 2018-02-05 20:48:48 +01:00
man Update manpages and auto-completion 2020-09-19 17:38:26 +02:00
.gitignore Document the build and release processes 2018-10-13 13:48:03 +02:00
010_introduction.rst Update docs 2018-04-28 22:08:11 +02:00
020_installation.rst doc: Add restic install instructions for Alpine Linux 2020-10-11 18:31:07 +02:00
030_preparing_a_new_repo.rst Document new option --repository-file 2020-10-01 00:50:27 +02:00
040_backup.rst Merge pull request #2998 from greatroar/env-docs 2020-10-24 22:49:31 +02:00
045_working_with_repos.rst init: Add --copy-chunker-params option 2020-09-19 16:53:05 +02:00
050_restore.rst doc: Update restic mount availability and requirements 2020-10-22 09:57:30 +02:00
060_forget.rst Refactor max-unused calculation, add unlimited option 2020-11-03 16:42:21 +01:00
070_encryption.rst Update docs 2018-04-28 22:08:11 +02:00
075_scripting.rst Update docs 2018-04-28 22:08:11 +02:00
080_examples.rst Update 080_examples.rst 2020-06-26 00:01:30 +02:00
090_participating.rst Remove -mod=vendor from all documentation and code 2020-03-01 19:32:35 +01:00
100_references.rst doc: Split references out into smaller files 2018-06-18 22:17:48 +02:00
110_talks.rst Update docs 2018-04-28 22:08:11 +02:00
bash-completion.sh Update manpages and auto-completion 2020-09-19 17:38:26 +02:00
cache.rst Systematize documentation of environment variables 2020-10-22 09:57:30 +02:00
conf.py Update docs 2018-04-28 22:08:11 +02:00
design.rst Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
developer_information.rst docs: Properly reproduce zip archives for windows binaries 2020-10-05 18:24:46 +02:00
faq.rst Add FAQ on whether restic can resume backups 2020-10-03 21:39:45 +02:00
index.rst doc: Add developer information 2018-10-11 22:37:25 +02:00
Makefile Document the build and release processes 2018-10-13 13:48:03 +02:00
manual_rest.rst Merge pull request #2998 from greatroar/env-docs 2020-10-24 22:49:31 +02:00
requirements.txt Documentation: Refactor and switch to Sphinx 2017-04-17 20:53:38 +02:00
REST_backend.rst doc: Split references out into smaller files 2018-06-18 22:17:48 +02:00
test_irreducibility.gap chunker: Require a random irreducible polynomial 2015-04-05 22:52:43 +02:00
zsh-completion.zsh Update manpages and auto-completion 2020-09-19 17:38:26 +02:00