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