Veritas-bu

[Veritas-bu] bpstart_notify.bat

2001-04-03 19:45:27
Subject: [Veritas-bu] bpstart_notify.bat
From: fx AT Veritas DOT com (fx [François-Xavier Peretmere])
Date: Wed, 4 Apr 2001 01:45:27 +0200
> From: Vandenberg Marianne [mailto:vandenberg.m AT mgx.co DOT za]
> Sent: Friday 30 March, 2001 11:26

> Is there anybody out there that can help me with a sample
> bpstart_notify.bat script? (to be used on NT)

 well, it's just plain script, nothing specific here. here's
a live sample, from my own laptop:

]-----[ bpstart_notify.Sys_Win.bat ]----
] @Echo off
] @Rem 1[client] 2[class] 3[schedule] 4[sched type] 5[] 6[rc file]
]
] set OUTF=D:\Logs\NetBackup\%2.log
]
] set REGBACK=C:\Win2k\regback.exe
] set GETLOG=C:\Win2k\eloglist.exe
] set OUTDIR=D:\SysBack
]
] REM 
---------------------------------------------------------------------------
] REM - Get date and time.
] REM 
---------------------------------------------------------------------------
] for /F "tokens=1*" %%p in ('date /T') do @set DATE=%%p %%q
] for /F %%p in ('time /T') do @set DATE=%DATE% %%p
]
] echo [%DATE%] 
-----------------------------------------------------------------
] echo [%DATE%] Starting script %0 - %3 (%4) of class %2 for %1 >> %OUTF%
]
] echo [%DATE%] Backuping HKLM\Software hive to %OUTDIR%\HKLM_software.rbk >> 
%OUTF%
] if exist %OUTDIR%\%1_HKLM_software.rbk del %OUTDIR%\%1_HKLM_software.rbk
] %REGBACK% %OUTDIR%\%1_HKLM_software.rbk machine software       >> %OUTF%
]
] echo [%DATE%] Saving %1 logs...                                >> %OUTF%
]
] if exist %OUTDIR%\%1_system.log del %OUTDIR%\%1_system.log
] %GETLOG% system > %OUTDIR%\%1_system.log                       >> %OUTF%
] if exist %OUTDIR%\%1_system_s.log del %OUTDIR%\%1_system_s.log
] %GETLOG% -s system > %OUTDIR%\%1_system_s.log                  >> %OUTF%
]
] if exist %OUTDIR%\%1_application.log del %OUTDIR%\%1_application.log
] %GETLOG% application > %OUTDIR%\%1_application.log             >> %OUTF%
]
] if exist %OUTDIR%\%1_security.log del %OUTDIR%\%1_security.log
] %GETLOG% security > %OUTDIR%\%1_security.log                   >> %OUTF%
] if exist %OUTDIR%\%1_security_s.log del %OUTDIR%\%1_security_s.log
] %GETLOG% -s security > %OUTDIR%\%1_security_s.log              >> %OUTF%
]
] Echo 0 > %6
] goto _exit
]
] :_exit

 it's just dumping the HKLM hive and the event logs in a file, at the
beginning of each backup from the "Sys_Win" class.

 hth,
     fx

#include <std_disclaimer.h>

--
      fx AT veritas DOT com      | Printer not ready.
François-Xavier Peretmere | Could be a fatal error.
http://www.veritas.com/   | Have a pen handy ?


<Prev in Thread] Current Thread [Next in Thread>