Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Pass multiple 'option' flags to restic #89

Merged
merged 4 commits into from
May 20, 2021
Merged

Conversation

cimnine
Copy link
Contributor

@cimnine cimnine commented May 11, 2021

When this PR is merged, wrestic looks for a new environment variable RESTIC_OPTIONS. It can be used to pass --option flags to wrestic, see https://restic.readthedocs.io/en/stable/manual_rest.html:

$ ./restic --help

restic is a backup program which allows saving multiple revisions of files and
directories in an encrypted repository stored on different backends.

Usage:
  restic [command]

Available Commands:
  backup        Create a new backup of files and/or directories
  cache         Operate on local cache directories
  cat           Print internal objects to stdout
  ...

Flags:
  ...
  -o, --option key=value           set extended option (key=value, can be specified multiple times)
  ...

Intended usage:

docker run -e "RESTIC_OPTIONS=key1=value,key2=value" -e "HOSTNAME=test" -e "PROM_URL=http://192.168.1.43:9091" -v /path/to/back:/data/ wrestic/wrestic

This is required for k8up-io/k8up#424.

@cimnine cimnine added the enhancement New feature or request label May 11, 2021
@cimnine cimnine self-assigned this May 11, 2021
@cimnine cimnine marked this pull request as draft May 11, 2021 13:41
@cimnine
Copy link
Contributor Author

cimnine commented May 17, 2021

Needs to be rebased onto #90 to get tests passing

@cimnine cimnine force-pushed the PassOptionsToRestic branch 2 times, most recently from d2a95ff to a9e749a Compare May 20, 2021 08:50
@cimnine cimnine force-pushed the PassOptionsToRestic branch from a9e749a to e13bdf1 Compare May 20, 2021 08:54
@cimnine cimnine marked this pull request as ready for review May 20, 2021 08:54
@cimnine cimnine requested review from Kidswiss and ccremer May 20, 2021 08:54
Copy link
Contributor

@ccremer ccremer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ( did not test it)

@cimnine cimnine merged commit a8fae24 into master May 20, 2021
@cimnine cimnine deleted the PassOptionsToRestic branch May 20, 2021 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants