I’m using the script to backup openwrt configuration as a file with date, e.g.
/openwrt_192.168.8.1-20220225_205201.tgz. The issue I’m having is that
restic forget --keep-last 7 does not work as expected, because each path is different, so no snapshot is forgotten. My workaround for this is:
restic forget --prune $(restic snapshots --no-lock --quiet --json | jq '. | .short_id' | tac | sed '1,7 d' | tac | sed 's/\"//g')