cancel
Showing results for 
Search instead for 
Did you mean: 

Automating BMR ISO creation

Mark_Garringer
Level 4

Background: I have a RHEL 6.6 Master server running 7.6.0.4. I have a dedicated Windows BMR server (Win 2k8 R2) that I use to create bootable ISOs. Generally speaking, I create the BMR job to a specific point in time (as opposed to using 'current'). I was able to find the commands I need to run on the Master to create the new Point in Time configs and prepare to restore so I could automate this process.

Challenge: I would like to be able to create bootable ISO images (as via using the bmrbsa.exe utility) but from the command line (or via a script) to automate the process. I cannot seem to find the right logs as I did with the config and prepare to restore. Does anyone have any tips on logging to try or bmrsrtadm.exe command line usage?

1 ACCEPTED SOLUTION

Accepted Solutions

sdo
Moderator
Moderator
Partner    VIP    Certified

Not sure, but I would have expected just this on its own to fail:

# bmrsrtadm -cli

...and I say that because no actions were specified, so it just quits.  The CLI based reporting of bad / incorrect / missing command line qualifiers / switches / arguments / parameters is pretty much non-existent, and any bad arguments and switches etc are only reported in the VxUL OID log 125... which means that getting the CLI constructs right involves a bit of trial and error.

And the command above does not drop in to a tool as such.  After all, it is un-documented.  I was testing on Windows, and it does appear to work ok.

.

For a Unix/Linux test perhaps these steps might be a suitable test to prove whether similar functionality exists for Unix/Linux:

1) Enable detailed bmrsrtadm logging:

# vxlogcfg -a -p 51216 -o 125 -s DiagnosticLevel=6 -s DebugLevel=6

2) Create an SRT using normal methods.

3) List the SRTs:

# bmrs -operation list -resource srt

4) Use bmrsrtadm to delete the SRT, because the syntax for deleting an SRT is fairly straightforward:

# bmrsrtadm -cli -task delete -srtname test01

5) List the SRTs again... has it been deleted?

# bmrs -operation list -resource srt

6) Check the VxUL logs:

# vxlogview -p 51216 -o 125 -t 00:05:00

.

I don't have a Unix/Linux system prep'd up to test on.  If someone else could test?  And specify their OS version and NetBackup version (would be good to know that too).      :)

View solution in original post

12 REPLIES 12

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Since you're trying to automate the process, why don't you used Network Based SRT instead of CD? That way you'll not need to move/mount the ISO to get the client to boot. It just boots using PXE.

Mark_Garringer
Level 4

Riaan - a boot network is something we have discussed, but it is a long way off from implementation.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

ok, I will check if I can figure out some options to bmrsrtadm

sdo
Moderator
Moderator
Partner    VIP    Certified

AFAIK bmrsrtadm cannot be scripted.  It is a menu/GUI based tool.

Mark_Garringer
Level 4

That may be, but it is still doing something behind the sceens to gererate the outputs. In theory that should be scriptable.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

I've tried to use strings to see what is going on in the executable but didn't come up with much......

sdo
Moderator
Moderator
Partner    VIP    Certified

When run using the "-cli" switch, I couldn't get it to wait and thus return a status code.  So, you'll have to use tasklist to wait for it to complete - and then possibly script a check of the vxlogview output.

sdo
Moderator
Moderator
Partner    VIP    Certified

To create an ISO, this worked for me:

bmrs -operation list -resource srt

bmrsrtadm -cli -task burn -srtname "test03" -isopath "E:\temp\myiso03.iso" -newsrtname "iso03"

tasklist /FI "IMAGENAME eq bmrsrtadm.exe"

bmrs -operation list -resource srt

vxlogview -p 51216 -o 125 -t 00:05:00

sdo
Moderator
Moderator
Partner    VIP    Certified

I did a bit more digging:

...in NetBackup Server v7.7 on Windows 2012 R2...

...configure logging:

vxlogcfg -l -p 51216 -o 125
vxlogcfg -a -p 51216 -o 125 -s DiagnosticLevel=6 -s DebugLevel=6
vxlogcfg -l -p 51216 -o 125

vxlogview -p 51216 -o 125 -t 00:05:00

...list SRTs:

bmrs -operation list -resource srt

...create an SRT:

bmrsrtadm -cli -task create -arch AMD64 -srttype fast -srtpath "J:\temp" -srtname "test01" -nbuinstall "E:\temp\NetBackup_7.7_Win\PC_Clnt\x64\Symantec NetBackup Client.msi"

tasklist /FI "IMAGENAME eq bmrsrtadm.exe"

bmrs -operation list -resource srt

vxlogview -p 51216 -o 125 -t 00:05:00

...delete an SRT:

bmrsrtadm -cli -task delete -srtname test01

tasklist /FI "IMAGENAME eq bmrsrtadm.exe"

bmrs -operation list -resource srt

vxlogview -p 51216 -o 125 -t 00:05:00

...the switches that I could determine:

bmrsrtadm

-cli         (to make bmrsrtadm auto answer its own GUI/prompts)

-offline     param? (offline?)    Not sure what this is for?
-online                           Not sure what this is for?

-task        burn | copy | create | delete | edit | export | import | pkg
-arch        AMD64
-pkgtask     nbump | nbuupdate

-srttype     fast
-srtpath     "X:\path"
-srtname     "blah"

-newsrtpath  "X:\path"
-newsrtname  "blah"

-nbuinstall  "J:\NBU_KITS\NetBackup Windows x64 - v7.7 - Client\Symantec NetBackup Client.msi"

-isopath     "X:\path"

-wimpath     "D:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim"

[end]

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Does this work on 7.6? I just get

[root@ora11g-01 logs]# bmrsrtadm -cli
[Error] V-125-658 Command line usage error.
Usage: bmrsrtadm

 

sdo
Moderator
Moderator
Partner    VIP    Certified

Not sure, but I would have expected just this on its own to fail:

# bmrsrtadm -cli

...and I say that because no actions were specified, so it just quits.  The CLI based reporting of bad / incorrect / missing command line qualifiers / switches / arguments / parameters is pretty much non-existent, and any bad arguments and switches etc are only reported in the VxUL OID log 125... which means that getting the CLI constructs right involves a bit of trial and error.

And the command above does not drop in to a tool as such.  After all, it is un-documented.  I was testing on Windows, and it does appear to work ok.

.

For a Unix/Linux test perhaps these steps might be a suitable test to prove whether similar functionality exists for Unix/Linux:

1) Enable detailed bmrsrtadm logging:

# vxlogcfg -a -p 51216 -o 125 -s DiagnosticLevel=6 -s DebugLevel=6

2) Create an SRT using normal methods.

3) List the SRTs:

# bmrs -operation list -resource srt

4) Use bmrsrtadm to delete the SRT, because the syntax for deleting an SRT is fairly straightforward:

# bmrsrtadm -cli -task delete -srtname test01

5) List the SRTs again... has it been deleted?

# bmrs -operation list -resource srt

6) Check the VxUL logs:

# vxlogview -p 51216 -o 125 -t 00:05:00

.

I don't have a Unix/Linux system prep'd up to test on.  If someone else could test?  And specify their OS version and NetBackup version (would be good to know that too).      :)

Mark_Garringer
Level 4

sdo - thanks, there are some steps in the right direction here but ultimately I have not been able to get this working in my 7.6.0.4 environment. A few of the commands are different than what you listed from your testing and logging, but the idea is sound. I turned up the logging on a bunch of OIDs and got some good information, but there still seems to be a missing part where it combines the restore configuration with the ISO that is not being logged at all.