#!/usr/bin/bash

while getopts ":-:" optchar; do
  [[ "${optchar}" == "-" ]] || continue
  case "${OPTARG}" in
    datadir=* )
        DATA_DIR=${OPTARG#*=}
        ;;
    scope=* )
        SCOPE=${OPTARG#*=}
        ;;
  esac
done

/usr/bin/pgbackrest --stanza=${SCOPE} --link-all restore
