summaryrefslogtreecommitdiff
path: root/rsnapshot-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'rsnapshot-wrapper')
-rwxr-xr-xrsnapshot-wrapper22
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')