-
Notifications
You must be signed in to change notification settings - Fork 26
replace custom wrapper scripts with runrestic #57
Comments
Going this path means that all bash/cron scripts should be removed from this repository and replaced with simple invocations of |
I think is a clever idea. |
Have you considered a separate role for installing restic itself, and (an)other role(s) for the wrapper(s)? |
@davdr that's a good idea, I didn't consider it. |
Maybe just allow setting the command prefix. This would allow switching between different restic installations (e.g. package manager, docker, ...). In my currently manual script, I am using something like: # restic.sh
source "vars.sh"
RESTIC_LOCAL='eval restic --cache-dir "$WORKDIR/cache"'
RESTIC_DOCKER='eval docker run --rm -t
-v $WORKDIR/cache:/restic_cache
-v /home/$USER:/restic_data:ro -w /restic_data
-e RESTIC_REPOSITORY
-e RESTIC_PASSWORD
-e AWS_ACCESS_KEY_ID
-e AWS_SECRET_ACCESS_KEY
restic/restic
--cache-dir /restic_cache'
RESTIC="$RESTIC_LOCAL" # change this to RESTIC_DOCKER if you like
$RESTIC "$@" So one can just run |
This role shouldn't reinvent the wheel and implement custom scripts for various restic functionalities. There are already many projects providing a simple to use wrapper on restic and those could be used instead.
We could use
runrestic
which is written in python3 and available viapip3 install runrestic
. Personally I like this one as it has clear configuration and includes instrumentation to push metrics to prometheus monitoring system.This is only an idea, but implementing this should greatly simplify second day operations and reduce role maintenance.
The text was updated successfully, but these errors were encountered: