The script provides a convenient way to load environment config, deal
with profiles and act as a pass-through to restic. The overall thing is
to improve the UX when running restic, integrating the features this
project provides.
## Note
The script itself is a very simple thing.
The command line parser is auto-generated using docopt.sh driven from
the script's DOC. It can be refreshed upon DOC changes with:
`docopt.sh path/to/resticw`.
## How to use it
### Examples
```console
sudo resticw stats latest
sudo resticw -p profileA snapshots
```
### Help
```console
❯ resticw --help
A little wrapper over restic just to handle profiles and environment loading.
It loads the backup profile/environment in a subshell to avoid any credential leak (Note: Run it with sudo so it can load the environment).
Usage:
resticw [options] <restic_arguments>
The restic_arguments is just the regular unwrapped restic arguments, e.g. stats latest
Options:
-p --profile=<name> Specify the profile to load or use default [default: default].
Examples:
sudo resticw --profile profileA snapshots
sudo resticw stats latest # this will use the profile: default
```
Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
Adds possibility to have multiple profiles with different backup paths, retention etc.
Co-authored-by: Matt Feifarek <matt.feifarek@gmail.com>
Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
As discussed in #46, it's not necessary to keep the local files
generated from the templates as the users should edit the installed
confs, not in the git.
Due to the security feature preventing checking in B2 credentials to
git, the install target would get the same file twice due to pattern
subsitution.
This issue is not visible with BSD install as it ignores the issue, but
GNU install wil fail.
Fixes#46
The target that copies the *.template files (#15) had a '/' prefixed which
should not be there. The copy should be locally here. The real install
happens in the install-conf that respects $PREFIX
Fixes#40