cupcakearmy / autorestic

Config driven, easy backup cli for restic.
https://autorestic.vercel.app/
Apache License 2.0
1.16k stars 68 forks source link

Suggestion: don't require 'from' key in locations that use include arguments. #372

Open Bostrolicious opened 2 months ago

Bostrolicious commented 2 months ago

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

Sometimes I would like to specify files to backup with include arguments (e.g. --files-from) without using the from key, which is currently required. An example use case is using find in a hook to generate a list of files to backup that match a certain pattern, without having a previously known path that fits in from - for instance, all docker-compose.yml files in all subdirectories of a given directory, but nothing else. Restic's documentation on include arguments has some examples of exactly what I would like to do.

Describe the solution you'd like

Perhaps only require the from key when include arguments aren't used? It's perfectly understandable if this adds too much complexity to validating the config. I can always just put som random file in from as a workaround.