Changeset 2239


Ignore:
Timestamp:
11/08/2008 16:30:52 (4 years ago)
Author:
chris
Message:

Add handling of backup-error events to NotifySysAdmin?.vbs.

Fix spelling errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupd/win32/NotifySysAdmin.vbs

    r1881 r2239  
    1111hostname = WshNet.ComputerName 
    1212 
    13 account = "0a1" 
     13account = "0x1" 
    1414from = "boxbackup@" & hostname 
    1515sendto = "admin@example.com" 
     16smtpserver = "smtp.example.com" 
    1617subjtmpl = "BACKUP PROBLEM on host " & hostname 
    17 smtpserver = "smtp.example.com" 
    1818 
    1919Set args = WScript.Arguments 
     
    2121If args(0) = "store-full" Then 
    2222        subject = subjtmpl & " (store full)" 
    23         body =  "The store account for "&hostname&" is full." & vbCrLf & vbCrLf & _ 
    24                         "=============================" & vbCrLf & _ 
    25                         "FILES ARE NOT BEING BACKED UP" & vbCrLf & _ 
    26                         "=============================" & vbCrLf & vbCrLf & _ 
    27                         "Please adjust the limits on account "&account&" on server "&hostname&"." _ 
    28                         & vbCrLf 
     23        body =  "The store account for "&hostname&" is full." & vbCrLf & _ 
     24                vbCrLf & _ 
     25                "=============================" & vbCrLf & _ 
     26                "FILES ARE NOT BEING BACKED UP" & vbCrLf & _ 
     27                "=============================" & vbCrLf & _ 
     28                vbCrLf & _ 
     29                "Please adjust the limits on account "&account&" on server "&hostname&"." _ 
     30                & vbCrLf 
    2931        SendMail from,sendto,subject,body 
    3032ElseIf args(0) = "read-error" Then 
    3133        subject = subjtmpl & " (read errors)" 
    32         body =  "Errors occured reading some files or directories for backup on "&hostname&"." _ 
    33                         & vbCrLf & vbCrLf & _ 
    34                         "===================================" & vbCrLf & _ 
    35                         "THESE FILES ARE NOT BEING BACKED UP" & vbCrLf & _ 
    36                         "===================================" & vbCrLf & vbCrLf & _ 
    37                         "Check the logs on "&hostname&" for the files and directories which caused" & _ 
    38                         "these errors, and take appropraite action." & vbCrLf & vbCrLf & _ 
    39                         "Other files are being backed up." & vbCrLf 
     34        body =  "Errors occurred reading some files or directories " & _ 
     35                "for backup on " & hostname & "." _ & vbCrLf & _ 
     36                vbCrLf & _ 
     37                "===================================" & vbCrLf & _ 
     38                "THESE FILES ARE NOT BEING BACKED UP" & vbCrLf & _ 
     39                "===================================" & vbCrLf & vbCrLf & _ 
     40                "Check the logs on "&hostname&" for the files and " & _ 
     41                "directories which caused" & vbCrLf & _ 
     42                "these errors, and take appropriate action." & vbCrLf & _ 
     43                vbCrLf & _ 
     44                "Other files are being backed up." & vbCrLf 
     45        SendMail from,sendto,subject,body 
     46ElseIf args(0) = "backup-error" Then 
     47        subject = subjtmpl & " (read errors)" 
     48        body =  "An error occurred during the backup on "&hostname&"." _ 
     49                & vbCrLf & vbCrLf & _ 
     50                "==========================" & vbCrLf & _ 
     51                "FILES MAY NOT BE BACKED UP" & vbCrLf & _ 
     52                "==========================" & vbCrLf & _ 
     53                vbCrLf & _ 
     54                "Check the logs on "&hostname&" for more " & _ 
     55                "information about the error, " & vbCrLf & _ 
     56                "and take appropriate action." & vbCrLf 
    4057        SendMail from,sendto,subject,body 
    4158ElseIf args(0) = "backup-start" Or args(0) = "backup-finish" Then 
     
    4461        subject = subjtmpl & " (unknown)" 
    4562        body =  "The backup daemon on "&hostname&" reported an unknown error." _ 
    46                         & vbCrLf & vbCrLf & _ 
    47                         "==========================" & vbCrLf & _ 
    48                         "FILES MAY NOT BE BACKED UP" & vbCrLf & _ 
    49                         "==========================" & vbCrLf & vbCrLf & _ 
    50                         "Please check the logs on "&hostname&"." & vbCrLf 
     63                & vbCrLf & vbCrLf & _ 
     64                "==========================" & vbCrLf & _ 
     65                "FILES MAY NOT BE BACKED UP" & vbCrLf & _ 
     66                "==========================" & vbCrLf & vbCrLf & _ 
     67                "Please check the logs on "&hostname&"." & vbCrLf 
    5168        SendMail from,sendto,subject,body 
    5269End If 
Note: See TracChangeset for help on using the changeset viewer.