Configuration management

Hi,

I’m new to restic and just started doing my first backups.
To configure my default backup I use two files to hide passwords and passphrases from the environment and some environment variables:

RESTIC_COMPRESSION=auto
RESTIC_PASSWORD_FILE=~/.restic/restic-pass
RESTIC_PROGRESS_FPS=2
RESTIC_REPOSITORY_FILE=~/.restic/restic-repo

But also some command line arguments:

restic backup --iexclude-file ~/.restic/excludes --exclude-caches /home

This means that my restic configuration distributed in several places: ~/.restic/, ~/.profile and ~/.zhistfile.

It works kind of fine, but I don’t exactly like a configuration spread across so many places.
One annoying consequence is that I need to unset RESTIC_REPOSITORY_FILE when I want to use an alternate repository. Otherwise:

Fatal: Options -r and --repository-file are mutually exclusive, please specify only one

In my mind, the -r option should just overrule the environment.

But now my question: How do you guys deal with configuring restic?

Well, just my impressions and thoughts. I started using restic a few days ago and I am really loving it.

What I have done is: I have a few scripts and inside all of them I put all the needed settings (paths for --files-from, paths for repo, paths for passwords and logs, etc).

This way I had to handle configuration just one time, the first time. From now on everything works as I expected.

All the above mentioned files are inside ~/restic. This is how I am working here.

1 Like

I currently use crestic for that:

1 Like

like reiner_sanders i also used a single single script with include and exclude files and an env-file where i put stuff like repository, password etc.

besides that i like resticprofile https://creativeprojects.github.io/resticprofile/
i have started with a single project in with resticprofile so far