12-14-2017
05:19 AM
- last edited on
12-14-2017
05:23 AM
by
Marianne
*** Moved to new post from: https://vox.veritas.com/t5/NetBackup/Script-Command-that-will-suspend-all-Active-jobs-for-Client-7/m... ***
Anyone know of a script or command that exists that would to suspend all active jobs for Netbackup client & resume after activity.
Below script for one server at a time, I want for script for multiple servers
suspend.bat:
del /Q c:\suspendjobs\runningjobs.txt
bpdbjobs -report -all_columns -ignore_parent_jobs> c:\suspendjobs\alljobs.txt
c:\suspendjobs\check.vbs
for /f %%a in (c:\suspendjobs\runningjobs.txt) do bpdbjobs -suspend %%a -quiet
check.vbs:
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\suspendjobs\alljobs.txt", ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
arrFields = Split(strLine,",")
If InStr(arrFields(6), "server1") And InStr(arrFields(3), "")<=0 Then
strContents = strContents & arrFields(0) & vbCrlf
End If
Loop
objFile.Close
Set objFile = objFSO.CreateTextFile("c:\suspendjobs\runningjobs.txt")
objFile.Write strContentsa
objFile.Write strContents
objFile.Close
12-22-2017 06:38 AM
I'd like to how in what context are the jobs being suspended.
As a general rule, when I need everything stopped:
12-22-2017 06:44 AM
Oh, I just saw the three year old thread: https://vox.veritas.com/t5/NetBackup/Script-Command-that-will-suspend-all-Active-jobs-for-Client-7/m...