Backends¶
Backends define a restic repository target. They must define:
Their
type
Their
path
At the moment we only support one type
but more are on the roadmap.
Optionally they can also define some restic environment variables to handle credentials:
RESTIC_PASSWORD
RESTIC_PASSWORD_COMMAND
RESTIC_PASSWORD_FILE
Backend configs are just files under the dir:
$XDG_CONFIG_DIR/bashtic/backends
type
¶
This variable can only take one value for now:
type="local"
Which indicates a repository on the local system.
path
¶
This variable specifies the location of the repository as a path on the local system:
path="/opt/backups/restic"
Of course it can be external storage or anything reachable in your local filesystem:
path="/run/media/$USER/Backup/restic"
RESTIC_PASSWORD
¶
This variable can be used to supply the restic repository password and avoid being prompted. This is probably not advisable as you’re potentially leaving your password available to other users and/or processes unencrypted.
RESTIC_PASSWORD=dontdothis
RESTIC_PASSWORD_COMMAND
¶
This variable is used to supply a command for restic to run that will supply the password on stdout.
RESTIC_PASSWORD_COMMAND=secret-tool lookup key
RESTIC_PASSWORD_FILE
¶
This variable is used to supply the location of a password file. Again you should be careful with the permissions of this file and consider whether you’re leaving your password available unencrypted to other users and/or process.
RESTIC_PASSWORD_FILE=/home/you/.secrets/passwordfile