autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Ability to only get restic output to stdout

Open varac opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I'd like to write certain restic output to a file / stdout. i.e. I'd like to get the json stats like this:

autorestic -v exec -a -- --json snapshots > snapshots.json

However, this mixes autorestic and restic output in a way that no valid json is produced.

Describe the solution you'd like

autorestic could provide a flag that redirect it's own output to stderr and restic's output to stdout, i.e.

autorestic -v --capture-restic-stdout exec -a -- --json snapshots > snapshots.json

What do you think ?

varac avatar Apr 29 '22 04:04 varac

Sounds related to #104 I see two ways to approach here:

  1. implement some --json flag
  2. have a new --omit-resitc (some better name) flag to suppress only the autorestic part

cupcakearmy avatar May 01 '22 16:05 cupcakearmy