#!/usr/bin/env sh
set -eu

if [ "${1:-}" = "" ]; then
  echo "Usage: scripts/restore.sh <backup.tar.gz>" >&2
  exit 1
fi

BACKUP_FILE="$1"

if [ ! -f "$BACKUP_FILE" ]; then
  echo "Backup nicht gefunden: $BACKUP_FILE" >&2
  exit 1
fi

tar -xzf "$BACKUP_FILE"
echo "Restore abgeschlossen: $BACKUP_FILE"
