diff options
author | pks <pks@pks.rocks> | 2023-10-03 10:41:29 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2023-10-03 10:41:29 +0200 |
commit | 99a48c2b5ddaedc0279c343c0fcf3041c6c2aaa3 (patch) | |
tree | 385fffac891b9b43d21be55144f5fb3c95d4c25b | |
parent | a7086584c8b09c5f589d6b2b68a66a325dcedcb2 (diff) |
rsnapshot-wrapper: alpha beta gamma etc.
-rwxr-xr-x | rsnapshot-wrapper | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/rsnapshot-wrapper b/rsnapshot-wrapper index bb930a3..621d154 100755 --- a/rsnapshot-wrapper +++ b/rsnapshot-wrapper @@ -4,7 +4,7 @@ set -x PRETEND="no" -run_rsnapshot() { +function run_rsnapshot() { rsnapshot -c /etc/rsnapshot.conf $1 } @@ -18,31 +18,31 @@ while true; do if dateutils.dtest "$TIME" --gt "20:00:00" && dateutils.dtest "$NOW" --lt "$TOMORROW 08:00:00"; then if [[ $PRETEND != "yes" ]]; then - echo "daily" - run_rsnapshot daily + echo "daily:beta" + run_rsnapshot beta fi if [[ $(date +%A) == "Sunday" ]]; then - echo "Sunday -> weekly" + echo "Sunday -> weekly:gamma" if [[ $PRETEND != "yes" ]]; then sleep 1800 # wait 30 minutes - run_rsnapshot weekly + run_rsnapshot gamma fi fi if [[ $(date +%d) == "01" ]]; then - echo "1st of a month -> monthly" + echo "1st of a month -> monthly:delta" if [[ $PRETEND != "yes" ]]; then sleep 1800 # wait 30 minutes - run_rsnapshot monthly + run_rsnapshot delta fi fi if [[ $(date +"%m-%d") == "01-01" ]]; then - echo "1st day of the year -> yearly" + echo "1st day of the year -> yearly:epsilon" if [[ $PRETEND != "yes" ]]; then sleep 1800 # wait 30 minutes - run_rsnapshot yearly + run_rsnapshot epsilon fi fi @@ -52,10 +52,10 @@ while true; do else - echo "hourly" + echo "hourly:alpha" if [[ $PRETEND != "yes" ]]; then - run_rsnapshot hourly + run_rsnapshot alpha fi wakeup=$(date -d "now + 1 hour" +'%Y%m%d%H5959') |