]> git.sven.stormbind.net Git - sven/scripts.git/blobdiff - hetzner/hetznerbackupv2.sh
two more echos where the output belongs into the sessionlog
[sven/scripts.git] / hetzner / hetznerbackupv2.sh
index 570ace5f51b061bcb8cf92f21d1929ad815a21bf..2db8f9283ddb2e35f0a1ead24972ff82130723aa 100755 (executable)
@@ -1,10 +1,5 @@
 #!/bin/bash
 
-### Halt on errors
-#set -e
-### Halt on unset variables
-set -u
-
 ### Do not inherit the following variables
 # Safety net just in case some calls this
 # script in a bogus way.
@@ -29,7 +24,7 @@ ERRSTAT=0
 ## Backup job for main
 job_main() {
     echo "" >> $SESSIONLOG
-    echo "Backing up main `date`" >>
+    echo "Backing up main `date`" >> $SESSIONLOG
     echo "" >> $SESSIONLOG
 
     echo "Going for /etc" >> $SESSIONLOG
@@ -73,10 +68,10 @@ fi
 
 ### Set the duplicity backup mode we would like to use
 if [[ $(LANG=C; date +%A) =~ Sunday ]]; then
-    echo "Runing in full mode"
+    echo "Runing in full mode" >> $SESSIONLOG
     BMODE="full"
 else
-    echo "Runing in incr mode"
+    echo "Runing in incr mode" >> $SESSIONLOG
     BMODE="incr"
 fi