chiark / gitweb /
From Peter Maydell (/u2/pmaydell/iwjbackup/) as per <E156bwm-0005xq-00@watchdragon...
[chiark-utils.git] / backup / driver
index 394b3fbf04e8d46465f4b8135a24bd8db0e1831b..a9bc37eedafc09bae0ce2e7b6b058d42b8776eac 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# This is the driver script that actually runs backups.
 
 cd /var/local/backup
 PATH=/usr/local/lib/backup:$PATH export PATH
@@ -11,19 +12,30 @@ fi
 rm -f this-status p p2
 echo 'FAILED to start dump script' >this-status
 
+# Here we go : run 'full', which (name notwithstanding) handles
+# both full and incremental backups, according to the ID of the
+# tape in the drive.
 full 2>&1 | tee this-log
 
 status=`cat this-status 2>/dev/null`
 
-cat <<END - this-log | /usr/lib/sendmail -oi -om -odq -t
-To: dump-reports
+# Mail a report to somewhere appropriate; -odq removed (means just 
+# queue message, don't try to deliver) because it just delays the
+# message (you might want that if mail was one of the services turned
+# off for the duration of the backup, though).
+cat <<END - this-log | /usr/lib/sendmail -oi -om -t
+To: dump-reports@mnementh.local
 Subject: Dump Report: $status
 
 END
 
 rm -f /TAPEID
 
+# Local hack for DAT drive on kuzuth: when done, eject the tape -- PMM
+mt rewoffl
+
 if [ "x$1" != test ]; then
+        # Bring the system up as multiuser again
        bringup
        stty isig
 fi