Files
pokemon-inventory/scripts/restore-image-storage.sh
fragginwagon 79df9d5c88
Quality / test (push) Canceled after 0s
feat: add restore drill coverage
Add restore verification and image-storage recovery scripts, update deployment documentation, and note the restore drill milestone in the implementation status.
2026-09-09 22:35:25 -04:00

16 lines
536 B
Bash

#!/bin/sh
set -eu
: "${IMAGE_STORAGE_SOURCE:?Set IMAGE_STORAGE_SOURCE to the source image-storage directory}"
: "${IMAGE_STORAGE_DESTINATION:?Set IMAGE_STORAGE_DESTINATION to the restore target directory}"
if [ ! -d "$IMAGE_STORAGE_SOURCE" ]; then
printf '%s\n' "Image storage source not found: $IMAGE_STORAGE_SOURCE" >&2
exit 1
fi
mkdir -p "$IMAGE_STORAGE_DESTINATION"
cp -a "$IMAGE_STORAGE_SOURCE/." "$IMAGE_STORAGE_DESTINATION/"
printf '%s\n' "Image storage restored from $IMAGE_STORAGE_SOURCE to $IMAGE_STORAGE_DESTINATION"