#!/usr/bin/env bash VOLUMES=$(find /backup -maxdepth 1 -type d -exec basename {} \; | tail -n +2) #loop volumes for VOLUME in $VOLUMES; do echo "Restoring $VOLUME" restic --verbose restore latest --include "/backup/$VOLUME" done