make weekly backup indepentend of month
This commit is contained in:
parent
e848189f02
commit
7f2592ed20
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
## Create by Stefan Sterz <hi@sterzy.com> in 2017
|
||||
|
||||
## General Settings
|
||||
SOURCES=(/root /etc /home /boot) # What folder should be saved?
|
||||
|
@ -141,7 +142,7 @@ fi
|
|||
|
||||
# Create a special backup approx every week
|
||||
if [[ $WEEKDAY = 7 ]]; then
|
||||
let WEEK=($DAY+6)/7
|
||||
let WEEK=$($DATE +"%W")%5 # save past 5 weeks
|
||||
backup "weekly/$WEEK"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue