add backup:days as zfs value
This commit is contained in:
parent
4e4358e517
commit
c2f41aa4e4
@ -31,18 +31,19 @@ then
|
||||
helpFunction
|
||||
fi
|
||||
|
||||
echo "$(date +%Y-%m-%d_%H:%M:%S): Starting Backup of $VM"
|
||||
|
||||
DAYS=$(zfs get backup:days -H -o value $SRCZFS)
|
||||
if [[ $DAYS == "-" ]]
|
||||
then
|
||||
DAYS=7
|
||||
fi
|
||||
|
||||
echo "$(date +%Y-%m-%d_%H:%M:%S): Keeping backups for $DAYS days"
|
||||
DAYS=$(($DAYS + 1))
|
||||
DATE=$(date "+%Y%m%d%H%M")
|
||||
DATEOLD=$(date -d -"$DAYS"day "+%Y%m%d")
|
||||
SNAPNAME="backup_$DATE"
|
||||
|
||||
echo "$(date +%Y-%m-%d_%H:%M:%S): Starting Backup of $VM"
|
||||
|
||||
abortFunction()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user