I have found a way to check if your backup has been succeeded. Fortunately it works with both Arcserve and Backupexec (and maybe others, but I wasn't able to test it).
It simply makes use of the habit of both applications to dump their backuplogs in plain text-format in a special directory. For instance, for BackupExec in my situation that is: "D:\Apps\VERITAS\Backup Exec\NT\Data" The logs are called "BEXxx.txt"
The main problem was that the filename of the latest backup-report of course changed each day. So I created a batchfile which copies every BEX*.TXT to LOGFILE.TXT, orderd by date so the newest BEXxx.TXT was finally overwriting LOGFILE.TXT. This batchfile is being ran by the Backup-job in the post-commandline. Now you can simply search for a string called "Job completion status: Successful". (Remember that when the string is found, which is good, the test actually results in Bad)
I also tested the file LOGFILE.TXT to see if it wasn't older than 6 hours, which may indicate that the batchfile wasn't run and therefore the backup didn't complete at all.
My setup finally became:
Batchfile for date-sorted sequencially overwrite LOGFILE.TXT:
Code: Select all
@Echo Off
Rem Search for .Logfiles
Dir "bex*.txt" /b /od > LogList.txt
Rem Copy every file to logfile.txt
for /F "tokens=*" %%I in (loglist.txt) do copy "%%I" logfile.txt
1st test: Check File-availability for date/time for not older than 720min (6 hours)
Code: Select all
Method = FileExists
;--- Common properties ---
;DestFolder = Root\TDV\Test\
RMAgent = SWE Hoofdlocatie
Title = SWE - Backuplog availability
Comment = D:\Apps\VERITAS\Backup Exec\NT\Data\logfile.txt
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 600
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = Internetconnectie
;--- Test specific properties ---
File = D:\Apps\VERITAS\Backup Exec\NT\Data\logfile.txt
OkIfExists = Yes
UseMacros = No
MaxAge = 720
- Dependend on the 1st test
Code: Select all
Method = CompareFiles
;--- Common properties ---
;DestFolder = Root\TDV\Test\
RMAgent = SWE Hoofdlocatie
Title = SWE Backuplog Result
Comment = alert when file contains string ("logfile.txt")
RelatedURL =
ScheduleMode= Regular
Schedule = 7 Days, 24 Hours
Interval = 600
Alerts = Do nothing
ReverseAlert= Yes
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = SWE - Backuplog availability
;--- Test specific properties ---
AlertMode = ContainsString
MissingCheck= Yes
UseMacros1 = No
UseMacros2 = No
File1 = D:\Apps\VERITAS\Backup Exec\NT\Data\logfile.txt
String = Job completion status: Successful
WholeWords = No
CaseSensitive = No
- Test only once a day
- Test only in the morning after the backup
- LOGFILE.TXT is older on monday, because in the weekend there was no backup during the weekend
and so forth
Good luck and happy testing!!