remove local old snapshot

This commit is contained in:
Jochen Welzel 2021-01-07 08:38:44 +01:00
parent e1ea936ffb
commit 7fb8538a44

View File

@ -3,7 +3,7 @@
helpFunction()
{
echo ""
echo "Usage: $0 -v VmName -t TargetHost -d TargetDataset"
echo "Usage: $0 -v VmName -t TargetHost -d TargetDataset -l LIMIT"
echo -e "\t-v Name of the vm to backup"
echo -e "\t-t Backup target host name"
echo -e "\t-s VM source zfs dataset"
@ -100,6 +100,7 @@ if [ $? -eq 0 ]
then
zfs set backup:success="true" $SRCZFS
zfs set backup:date="$DATE" $SRCZFS
zfs destroy "$SRCZFS"@"$LASTSNAP"
else
zfs set backup:success="false" $SRCZFS
zfs set backup:failed="$DATE" $SRCZFS