snapshot_delete
This commit is contained in:
parent
7779763cb4
commit
04a532ef76
1 changed files with 17 additions and 0 deletions
17
snapshot.sh
17
snapshot.sh
|
@ -97,6 +97,21 @@ elif [ "restore" == "$1" ]; then
|
||||||
|
|
||||||
#reboot
|
#reboot
|
||||||
|
|
||||||
|
elif [ "delete" == "$1" ]; then
|
||||||
|
|
||||||
|
while (( "$(expr $# - 1)" ))
|
||||||
|
do
|
||||||
|
pfad="${2}"
|
||||||
|
|
||||||
|
if btrfs subvolume delete /run/btrfs-root/__snapshot/${pfad}\@* ;then
|
||||||
|
echo "${pfad} erfolgreich gelöscht!!!"
|
||||||
|
else
|
||||||
|
echo "${pfad} konnte nicht gefunden werden!!!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "bash ./snapshot.sh PARAMETER PFAD"
|
echo "bash ./snapshot.sh PARAMETER PFAD"
|
||||||
|
@ -107,3 +122,5 @@ else
|
||||||
btrfs subvolume list -p /
|
btrfs subvolume list -p /
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Fertig !!!"
|
||||||
|
|
Loading…
Reference in a new issue