remove local old snapshot
This commit is contained in:
parent
e1ea936ffb
commit
7fb8538a44
@ -3,7 +3,7 @@
|
|||||||
helpFunction()
|
helpFunction()
|
||||||
{
|
{
|
||||||
echo ""
|
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-v Name of the vm to backup"
|
||||||
echo -e "\t-t Backup target host name"
|
echo -e "\t-t Backup target host name"
|
||||||
echo -e "\t-s VM source zfs dataset"
|
echo -e "\t-s VM source zfs dataset"
|
||||||
@ -100,6 +100,7 @@ if [ $? -eq 0 ]
|
|||||||
then
|
then
|
||||||
zfs set backup:success="true" $SRCZFS
|
zfs set backup:success="true" $SRCZFS
|
||||||
zfs set backup:date="$DATE" $SRCZFS
|
zfs set backup:date="$DATE" $SRCZFS
|
||||||
|
zfs destroy "$SRCZFS"@"$LASTSNAP"
|
||||||
else
|
else
|
||||||
zfs set backup:success="false" $SRCZFS
|
zfs set backup:success="false" $SRCZFS
|
||||||
zfs set backup:failed="$DATE" $SRCZFS
|
zfs set backup:failed="$DATE" $SRCZFS
|
||||||
|
Loading…
Reference in New Issue
Block a user