[docs] Correct env/command param precedence
Author: fulldecentCreated Aug 30, 2026Updated Sep 6, 2026
Output of restic version
restic 0.19.0 compiled with go1.26.4 on darwin/arm64
What backend/service did you use to store the repository?
n/a
Problem description / Steps to reproduce
- Read documentation at 075_scripting.rst regarding whether
RESTIC_REPOSITORYenvironmental variable or-rcommand flag will take precedence. - Use the actual app
Expected behavior
- ✅ App shows that
-rtakes precedence overRESTIC_REPOSITORY. - :x: Documentation shows that
-roverridesRESTIC_REPOSITORY.
Proof
❯ export RESTIC_REPOSITORY="./tmp-env"
export RESTIC_PASSWORD="pass"
restic init -r ./tmp-param
created restic repository 6a91605391 at ./tmp-param
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
❯ ls
tmp-paramActual behavior
Documentation states that "RESTIC_REPOSITORY ... replaces -r".
Notes
- Please find all mentions of "replaces" in the documentation, there are multiple instances of this problem in this file, and perhaps in other files.
- Other parts of the documentation instead say the correct thing. Such as manual_rest.rst which says:
-r,--repo repositoryrepository to backup to or restore from (default:$RESTIC_REPOSITORY)
- In 75_scripting, perhaps a clean fix is to say like:
RESTIC_REPOSITORY_FILEName of file containing the repository location (overridden by --repository-file)
Do you have any idea what may have caused this?
Unintentional word choice, initially started at https://github.com/restic/restic/commit/df78896e59fc580d441ed10428832d7fae0ed3d1#diff-7d39a17a985c0d91907a249bab79adb98850521b3c30cd2ef221d1a5f93018a0R335-R336
Did restic help you today? Did it make you happy in any way?
Restic makes me happy every day, at exactly 2am!
Source: restic/restic