Quality / test (push) Canceled after 0s
Add restore verification and image-storage recovery scripts, update deployment documentation, and note the restore drill milestone in the implementation status.
16 lines
536 B
Bash
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"
|