From 7a83756f96e13315f318ff43f6b467ff6c55e814 Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Sat, 19 Feb 2011 10:02:02 +0100 Subject: [PATCH] Reorder startup messages --- hetzner/hetznerbackupv2.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hetzner/hetznerbackupv2.sh b/hetzner/hetznerbackupv2.sh index 2db8f92..7f07a04 100755 --- a/hetzner/hetznerbackupv2.sh +++ b/hetzner/hetznerbackupv2.sh @@ -23,10 +23,6 @@ ERRSTAT=0 ## Backup job for main job_main() { - echo "" >> $SESSIONLOG - echo "Backing up main `date`" >> $SESSIONLOG - echo "" >> $SESSIONLOG - echo "Going for /etc" >> $SESSIONLOG duplicity $BMODE $dry /etc $PROTO://$FTP_USER@$FTP_HOST/main/etc >> $SESSIONLOG 2>&1 || ERRSTAT=1 duplicity remove-all-but-n-full 5 --force $dry $PROTO://$FTP_USER@$FTP_HOST/main/etc >> $SESSIONLOG 2>&1 || ERRSTAT=1 @@ -51,7 +47,7 @@ job_main() { echo "" >> $SESSIONLOG } -# Append the session log to the main logfile and remove it +## Append the session log to the main logfile and remove it clean_log() { cat $SESSIONLOG >> $LOGFILE rm $SESSIONLOG @@ -66,6 +62,11 @@ else touch $LOCKFILE fi +### Starting + echo "" >> $SESSIONLOG + echo "Starting Backup `date`" >> $SESSIONLOG + echo "" >> $SESSIONLOG + ### Set the duplicity backup mode we would like to use if [[ $(LANG=C; date +%A) =~ Sunday ]]; then echo "Runing in full mode" >> $SESSIONLOG -- 2.39.5