Restic snapshots path option matching completely

Currently I have setup:

Backup Job 1 - paths A and B
Backup Job 2 - paths A and B and C

if I do restic snapshots --path A --path B I get snapshots from both jobs. Is there a way to force the match to be complete (so no snapshots from job 2)

The reason I need this is that I am using the output to get the last two snapshots from a job which I feed to restic diff to see what has changed in last snapshot but currently having the list include snapshots from both is causing problems.

1 Like

You can tag the backups differently and then search the snapshots based on tags.

restic snapshots --tag job1

1 Like

There is no option in restic to filter by exact paths-list. But you can filter using some jq magic using restic snapshots --json.

The alternative would be to ask for some new feature option in restic (or use rustic --filter-paths-exact).