Skip to content

Include filter #141

Closed Answered by jshank
jshank asked this question in Q&A
Dec 9, 2021 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

4-year later, I finally figured this out using a combination of the prevalidate hooks to use find to generate a file including exactly what I wanted, then files-from-verbatim to utilize that file. The trick was getting rid of the required from as it was causing the re-inclusion of the files I didn't want. Feeding it /dev/null did the trick.

  docker_configs:
    from:
    - /dev/null
    to:
    - localbackup
    hooks:
      dir: ""
      prevalidate:
      - find /mnt/media/docker-configs -maxdepth 2 \( -name docker-compose.yaml -o -name "docker-compose.yml" \) 2>/dev/null > /mnt/media/scripts/restic/docker-configs-include
    cron: 2 2 * * *
    options:
      backup:
        exclude:
…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@jshank
Comment options

@cupcakearmy
Comment options

@cupcakearmy
Comment options

@jshank
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jshank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants