]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Fix optional files in Makefile.in of src/filed that caused
authorKern Sibbald <kern@sibbald.com>
Fri, 20 Oct 2006 00:41:22 +0000 (00:41 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 20 Oct 2006 00:41:22 +0000 (00:41 +0000)
     a syntax error when using no optional files.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3568 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/Makefile.in
bacula/examples/reports/bacula_mail_summary.sh
bacula/projects
bacula/technotes-1.39

index e4a0562cdd718402f8a1788b8fc44e1c5340a1fa..4187ecb951b0bb1df09622722e031a99aadf255b 100755 (executable)
@@ -19,8 +19,8 @@ dummy:
 
 # --client-only directories
 fd_subdirs = src scripts src/lib src/findlib src/filed \
-            @READLINE_SRC@ src/console \
-            @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@
+       @READLINE_SRC@ @GNOME_DIR@ @TRAY_MONITOR_DIR@ @WX_DIR@ \
+       src/console
 
 # Non-client-only directores
 subdirs =    src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
index 266bfd1e5a34261f72a802cc59a0f3f0c01b4fd5..901f2efc9333b188fa9ba5d22414c1b2d958a483 100755 (executable)
@@ -3,19 +3,37 @@
 # and send it to people who care.
 #
 # For it to work, you need to have all Bacula job report
-# mails cc'd to a unix mailbox called 'bacula', but of course you can edit
-# as appropriate. This should be run after all backup jobs have finished.
+# loggin to file, edit path for Your needs
+# This should be run after all backup jobs have finished.
 # Tested with bacula-1.38.0
 
+# Some improvements by: Andrey Yakovlev <freedom@kiev.farlep.net>  (ISP Farlep)
 # Contributed by Andrew J. Millar <andrew@alphajuliet.org.uk>
+# Patched by Andrey A. Yakovlev <freedom@kiev.farlep.net>
 
 # Use awk to create the report, pass to column to be
 # formatted nicely, then on to mail to be sent to
 # people who care.
-EMAIL_LIST="peoplewhocare@company.com"
+
+EMAIL_LIST="freedom@kiev.farlep.net"
+
+LOG='/var/db/bacula/log'
+
+
+#---------------------------------------------------------------------
+
 awk -F\:\  'BEGIN {
                         print "Client Status Type StartTime EndTime Files Bytes"
                 }
+                
+        /orion-dir: New file:/ {
+                print $3
+        }
+        
+        /orion-dir: File:/ {
+                print $3
+        }
+                
         /Client/ {
                 CLIENT=$2; sub(/"/, "", CLIENT) ; sub(/".*$/, "", CLIENT)
         }
@@ -28,20 +46,28 @@ awk -F\:\  'BEGIN {
         /End time/ {
                 ENDTIME=$2; sub(/.*-.*-.* /, "", ENDTIME)
         }
+        /Files Examined/ {
+                SDFILES=$2
+                SDBYTES=0
+        }
         /SD Files Written/ {
                 SDFILES=$2
         }
-         /SD Bytes Written/ {
+        /SD Bytes Written/ {
                 SDBYTES=$2
         }
         /Termination/ {
                 TERMINATION=$2 ;
                 sub(/Backup/, "", TERMINATION) ;
-                printf "%s %s %s %s %s %s %s \n", CLIENT,TERMINATION,TYPE,STARTTIME,ENDTIME,SDFILES,SDBYTES}' /var/spool/mail/bacula | \
-        column -t | \
-        mail -s "Bacula Summary for `date -d yesterday +%a,\ %D`" ${EMAIL_LIST}
+                gsub(/\*\*\*/, "", TERMINATION) ;
+                sub(/Verify OK/, "OK-Verify", TERMINATION) ;
+                sub(/y[ ]/, "y-", TERMINATION) ;
+                printf "%s %s %s %s %s %s %s \n", CLIENT,TERMINATION,TYPE,STARTTIME,ENDTIME,SDFILES,SDBYTES}' ${LOG} | \
+        column -t -x | \
+        mail -s "Bacula Summary for `date -v -1d  +'%a, %F'`" ${EMAIL_LIST}
 #
-# Empty the mailbox
-cat /dev/null > /var/spool/mail/bacula
+# Empty the LOG
+cat ${LOG} > ${LOG}.old
+cat /dev/null > ${LOG}
 #
 # That's all folks
index 76c0e48a7647daf1df43c8cf21cc345601464427..3da15a6a3275083664935f2379979e008531a21c 100644 (file)
@@ -1074,3 +1074,82 @@ Item 1:   Filesystemwatch triggered backup.
   Notes:  This can be combined with configration that specifies
           something like: "at most every 15 minutes or when changes
           consumed XX MB".
+
+Item n:  Message mailing based on backup types
+Origin:  Evan Kaufman <evan.kaufman@gmail.com>
+  Date:  January 6, 2006
+Status:
+
+  What:  In the "Messages" resource definitions, allowing messages
+         to be mailed based on the type (backup, restore, etc.) and level
+         (full, differential, etc) of job that created the originating
+         message(s).
+
+Why:     It would, for example, allow someone's boss to be emailed
+         automatically only when a Full Backup job runs, so he can
+         retrieve the tapes for offsite storage, even if the IT dept.
+         doesn't (or can't) explicitly notify him.  At the same time, his
+         mailbox wouldnt be filled by notifications of Verifies, Restores,
+         or Incremental/Differential Backups (which would likely be kept
+         onsite).
+
+Notes:
+        One way this could be done is through additional message types, for example:
+
+   Messages {
+     # email the boss only on full system backups
+     Mail = boss@mycompany.com = full, !incremental, !differential, !restore, 
+            !verify, !admin
+     # email us only when something breaks
+     MailOnError = itdept@mycompany.com = all
+   }
+
+
+Item n:   Allow inclusion/exclusion of files in a fileset by creation/mod times
+  Origin: Evan Kaufman <evan.kaufman@gmail.com>
+  Date:   January 11, 2006
+  Status:
+
+  What:   In the vein of the Wild and Regex directives in a Fileset's
+          Options, it would be helpful to allow a user to include or exclude
+          files and directories by creation or modification times.
+
+          You could factor the Exclude=yes|no option in much the same way it
+          affects the Wild and Regex directives.  For example, you could exclude
+          all files modified before a certain date:
+
+   Options {
+     Exclude = yes
+     Modified Before = ####
+   }
+
+           Or you could exclude all files created/modified since a certain date:
+
+   Options {
+      Exclude = yes
+     Created Modified Since = ####
+   }
+
+           The format of the time/date could be done several ways, say the number
+           of seconds since the epoch:
+           1137008553 = Jan 11 2006, 1:42:33PM   # result of `date +%s`
+
+           Or a human readable date in a cryptic form:
+           20060111134233 = Jan 11 2006, 1:42:33PM   # YYYYMMDDhhmmss
+
+  Why:    I imagine a feature like this could have many uses. It would
+          allow a user to do a full backup while excluding the base operating
+          system files, so if I installed a Linux snapshot from a CD yesterday,
+          I'll *exclude* all files modified *before* today.  If I need to
+          recover the system, I use the CD I already have, plus the tape backup.
+          Or if, say, a Windows client is hit by a particularly corrosive
+          virus, and I need to *exclude* any files created/modified *since* the
+          time of infection.
+
+  Notes:  Of course, this feature would work in concert with other
+          in/exclude rules, and wouldnt override them (or each other).
+
+  Notes:  The directives I'd imagine would be along the lines of
+          "[Created] [Modified] [Before|Since] = <date>".
+          So one could compare against 'ctime' and/or 'mtime', but ONLY 'before'
+           or 'since'.
index 04e87eb25009962271ee4e56419f9d7a96d53abc..ce7172b95202ccbb09d8f1ccdd9f1aee0664b111 100644 (file)
@@ -2,9 +2,17 @@
 
 General:
 
-Version 1.39.24 released:
-12Oct06
-kes  Apply the three patches from Richard Mortimer. 
+20Oct06
+kes  Fix optional files in Makefile.in of src/filed that caused
+     a syntax error when using no optional files.
+15Oct06
+lf   Fix a cosmetic bug in filed.c that caused spurious OpenSSL error
+     messages; there is no reason to attempt to load a private key.
+     from master key files.  
+
+Version 1.39.24 released: 
+12Oct06 
+kes  Apply the three patches from Richard Mortimer.
      bacula-reposition.patch, bacula-tape-reopen.patch, and
      bacula-eod.patch. This corrects tape positioning on older devices,
      and also a problem with btape.