2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 14:17:42 +00:00

doc: Add note on tilde expansion in exclude files

Explains to the reader that tilde expansion does not work in exclude files, and that they should instead use the $HOME variable.
This commit is contained in:
rawtaz 2020-04-18 12:47:47 +02:00 committed by GitHub
parent b7c0d4d8bf
commit 9dba7a2577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ even if restic is passed a relative path to save.
Environment-variables in exclude files are expanded with `os.ExpandEnv <https://golang.org/pkg/os/#ExpandEnv>`__, Environment-variables in exclude files are expanded with `os.ExpandEnv <https://golang.org/pkg/os/#ExpandEnv>`__,
so ``/home/$USER/foo`` will be expanded to ``/home/bob/foo`` for the user ``bob``. so ``/home/$USER/foo`` will be expanded to ``/home/bob/foo`` for the user ``bob``.
To get a literal dollar sign, write ``$$`` to the file. To get a literal dollar sign, write ``$$`` to the file. Note that tilde (``~``) expansion does not work, please use the ``$HOME`` environment variable instead.
Patterns need to match on complete path components. For example, the pattern ``foo``: Patterns need to match on complete path components. For example, the pattern ``foo``: