This handy wrapper lets you configure restic backup with one file.

Descriptive text for the image Source at github.com/kratss/restic-config-wrapper

Features

Simple: Keep restic configuration in the same place as the rest of your configs instead of an unwieldy in-line argument

Short: With just 30 lines, you can review the code in a couple minutes

Variable expansion: Unlike restic, the wrapper can expand $HOME and other variables for all arguments

Usage

Configure backup directories, location of environment variables to source, and all other command-line arguments found in man restic-backup in the config.ini When it’s configured to your liking, simply run restic-config-wrapper in place of restic backup. It will still accept in-line arguments that restic backup accepts The [environment variables] section is for sourcing variables like $ACCESS_KEY that users often keep separate from other dotfiles for security Any wildcards like * will be expanded by fish

Contributing

If you have any improvements or fixes, feel free to contribute them

Installation

Dependencies: fish, restic

By default, restic-config-wrapper looks for $XDG_CONFIG_HOME/restic/config.ini, then ~/.config/restic/config.ini

[backup directories]
# Files to backup
$HOME/Documents/ 
$HOME/Music
[environment variables]
# Optionally source environment variables
/path/to/my_vars.env
[options]
# Any other options specified in the man page
exclude-caches
exclude=docker
exclude=__pycache__