#!/bin/bash read -p " a - obnovit ze zálohy, b - udělat novou zálohu, x - konec, jinak reboot" if [ "$REPLY" = "a" ]; then #obnoveni defaultni zálohy LIST=$(ls /backup/*.gz) select FILE in $LIST do gunzip -c $FILE | ntfsclone --restore-image --overwrite /dev/sda1 - #read -p "reboot" reboot done elif [ "$REPLY" = "b" ]; then #vytvoreni nove zalohy ntfsclone -s -o - /dev/sda1 |gzip -c > /backups/win$(date +%Y_%m_%d-%H-%M-%S).gz reboot elif [ "$REPLY" = "x" ]; then #pro administraci exit else echo "tak nic" reboot fi