cancel
Showing results for 
Search instead for 
Did you mean: 

Want to run admincmd commands from NetBackup client on Linux

siddharth_khata
Level 3

Hi,

I am using Linux platform for running Netbackup 7.0 tool. I have installed Netbackup server on one machine & client on another machine.

I need to run some of the commands like 'bperror' from admincmd folder on client machine as my script is containing such  commands.

I know that admincmd folder is present only on server, not on client.

But I can achieve this on windows machine by installing "Remote Administration Console" on windows client. Then I am successfully able to execute same set of commands from windows machine.

I need to install same set of commands from Linux client as well.

Please let me know how to achieve this? Also, is there any option to install "Remote Administration Console" on linux client. Because linux master server installer does not contain any option to install this.

1 ACCEPTED SOLUTION

Accepted Solutions

Jim-90
Level 6

I had the same probem.and fixed it by creating a linux media server as VMware guest.  All other NBU servers were windows.  The media server does nothing but reporting, it doesn't do any data moving. I set up sudo for the other users. Stay away from RSH unless you want to be beaten up by security auditors and the like.  If you have a NBU capacity license then no license is required for the additional reporting media server.

Using SSH keys to remotely run command (known as SSH forced commands) will work only if the master or media server is running a SSH server, a SSH server for windows doesn't exist in MS Unix Services for Windows...you may have to try Cygwin.

The only thing I regretted was putting OpsCenter on a windows box.  It should have gone on the linux reporting media server (described above).  You can dump your scheduled reports to a directroy and rework the reports with a cronned script and mail to those that cares. I find OpsCenter is good for generating basic reports but require reworking make them really useful. 

 

Using sudo has some gotchas.  I think this covers most of them

User bkup may run the following commands on this host:
    (root) NOPASSWD: /usr/openv/netbackup/bin/
    (root) NOPASSWD: /usr/openv/netbackup/bin/admincmd/
    (root) NOPASSWD: /usr/openv/netbackup/bin/support/
    (root) NOPASSWD: /usr/openv/netbackup/bin/goodies/
    (root) NOPASSWD: /usr/openv/netbackup/bin/goodies/support/
    (root) NOPASSWD: /usr/openv/volmgr/bin/
    (root) NOPASSWD: /etc/init.d/netbackup
    (root) NOPASSWD: /usr/bin/crontab -l

All the logs are created by root - you will need the ability to clean them up
    (root) NOPASSWD: /usr/bin/rm /opt/openv/netbackup/logs/*
    (root) NOPASSWD: /bin/chmod -R g+r /usr/openv/netbackup/logs/user_ops
    (root) NOPASSWD: /bin/chgrp -Rh bkup /usr/openv/netbackup/logs/user_ops
    (root) NOPASSWD: /bin/chown -Rh bkup /home/bkup/tmp/*

You need to be able to kill NBU process that a running as root - a sample
    (root) NOPASSWD: /usr/bin/pkill -9 -f bpsched
    (root) NOPASSWD: /usr/bin/pkill -f bpsched
    (root) NOPASSWD: /usr/bin/pkill -9 -f bprd
    (root) NOPASSWD: /usr/bin/pkill -f bprd
    (root) NOPASSWD: /usr/bin/pkill -9 -f bpjava-susvc
    (root) NOPASSWD: /usr/bin/pkill -9 -f your_script.bsh
    (root) NOPASSWD: /usr/bin/pkill -f your_script.bsh

  

 

View solution in original post

5 REPLIES 5

Mark_Solutions
Level 6
Partner Accredited Certified

For Linux you would have to install it as a Server to get the full functionality you get when installing the Windows Remote Admin Console

Only when installed as a server do you get all of the commands and their accociated components that allow them to work (as well as being a "server" that is validated to run the commands anyway)

Hope this helps

revarooo
Level 6
Employee

Another option, if you have a Master/media server, then just set up some scripts on your client to rsh to the client and run the commands you want!

i.e.from client:

 

rsh <master_server> "/usr/openv/netbackup/bin/bperror -U"

Will_Restore
Level 6

I have used Mark's suggestion in the past and nowadays use revaroo's method, except we do ssh vs rsh

 

Stumpr2
Level 6

most commands require root priviliges. Get a login ID for the master server with sudo priv for the files in the /usr/openv/netbackup/bin... directories.

Jim-90
Level 6

I had the same probem.and fixed it by creating a linux media server as VMware guest.  All other NBU servers were windows.  The media server does nothing but reporting, it doesn't do any data moving. I set up sudo for the other users. Stay away from RSH unless you want to be beaten up by security auditors and the like.  If you have a NBU capacity license then no license is required for the additional reporting media server.

Using SSH keys to remotely run command (known as SSH forced commands) will work only if the master or media server is running a SSH server, a SSH server for windows doesn't exist in MS Unix Services for Windows...you may have to try Cygwin.

The only thing I regretted was putting OpsCenter on a windows box.  It should have gone on the linux reporting media server (described above).  You can dump your scheduled reports to a directroy and rework the reports with a cronned script and mail to those that cares. I find OpsCenter is good for generating basic reports but require reworking make them really useful. 

 

Using sudo has some gotchas.  I think this covers most of them

User bkup may run the following commands on this host:
    (root) NOPASSWD: /usr/openv/netbackup/bin/
    (root) NOPASSWD: /usr/openv/netbackup/bin/admincmd/
    (root) NOPASSWD: /usr/openv/netbackup/bin/support/
    (root) NOPASSWD: /usr/openv/netbackup/bin/goodies/
    (root) NOPASSWD: /usr/openv/netbackup/bin/goodies/support/
    (root) NOPASSWD: /usr/openv/volmgr/bin/
    (root) NOPASSWD: /etc/init.d/netbackup
    (root) NOPASSWD: /usr/bin/crontab -l

All the logs are created by root - you will need the ability to clean them up
    (root) NOPASSWD: /usr/bin/rm /opt/openv/netbackup/logs/*
    (root) NOPASSWD: /bin/chmod -R g+r /usr/openv/netbackup/logs/user_ops
    (root) NOPASSWD: /bin/chgrp -Rh bkup /usr/openv/netbackup/logs/user_ops
    (root) NOPASSWD: /bin/chown -Rh bkup /home/bkup/tmp/*

You need to be able to kill NBU process that a running as root - a sample
    (root) NOPASSWD: /usr/bin/pkill -9 -f bpsched
    (root) NOPASSWD: /usr/bin/pkill -f bpsched
    (root) NOPASSWD: /usr/bin/pkill -9 -f bprd
    (root) NOPASSWD: /usr/bin/pkill -f bprd
    (root) NOPASSWD: /usr/bin/pkill -9 -f bpjava-susvc
    (root) NOPASSWD: /usr/bin/pkill -9 -f your_script.bsh
    (root) NOPASSWD: /usr/bin/pkill -f your_script.bsh