boot_tiny: add clone script

This commit is contained in:
zolliker 2024-01-24 10:55:38 +01:00
parent 7449d7344e
commit 7fedae2688

9
clone Normal file
View File

@ -0,0 +1,9 @@
sh tiny
DEST=l_samenv@samenv:boxes/images
IMGDAT=apumaster_$(date +'%Y-%m-%d')
read -p "image name to write to $DEST [$IMGDAT]: " IMG
if [ -z "$IMG" ]; then
IMG=$IMGDAT
fi
echo "copy image to $DEST/$IMG ..."
dd if=/dev/sda bs=512k | lz4 | ssh l_samenv@samenv "dd of=$DEST/$IMG bs=512k"