remove local old snapshot

This commit is contained in:
Jochen Welzel 2021-01-07 08:38:44 +01:00
parent e1ea936ffb
commit 7fb8538a44
1 changed files with 2 additions and 1 deletions

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