cancel
Showing results for 
Search instead for 
Did you mean: 

command to make a client offline in netbackup?

NIKHIL234656595
Level 6

what is the command to make a client offline in netbackup?I am using netbackup 7.1.

 

I have used below command but getting the error;

395  sudo ./bpclient -current_hostname nik42 -offline --

 1397  sudo ./bpclient -current_hostname nik42 -offline -onlineat 06/13/2012

 1398  sudo ./bpclient -current_hostname nik42 -offline -ut -onlineat 06/13/2012

 1399  sudo ./bpclient -current_hostname nik42 -offline -ut -onlineat 06/13/2012 12:00:00

 1405  sudo ./bpclient -client nik42 -update -current_hostname nik42 -offline 06/19/2012 09:34:30

 1406  sudo ./bpclient -client nik42 -update -current_hostname nik42-offline  -onlineat 06/19/2012 09:34:30

 1407  sudo ./bpclient -client nik42  -update -current_hostname nik42 -offline 06/19/2012  -onlineat  09:34:30

 1408  sudo ./bpclient -client nik42 -update -current_hostname nik42 -offline -ut  -onlineat 06/19/2012 09:34:30

 1409  sudo ./bpclient -client nik42 -update  -offline -ut  -onlineat 06/19/2012 09:34:30

 1410  sudo ./bpclient -client nik42  -update  -offline  -onlineat 06/19/2012 09:34:30

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

Was it specifically the command line option you were looking for?

Much easier to open the Master Server Host Properties - add the client in and set the offline time in there

Love command lines but also believe in making life easy!

Hope this helps

View solution in original post

10 REPLIES 10

Marianne
Level 6
Partner    VIP    Accredited Certified

What error are you getting?

Have you added client name yet?

bpclient command has its own 'database' - it does not automatically use client list in policy config.

So, first step is to add client name:

bpclient -client <client_name>  -add

Then update. I have never tried it from cmd, but I would try this one:

bpclient -client <client_name> -update -offline -onlineat <time>

-ut needs Unixtime

So, if I need Client online 17 June 2012 @ 06:00, my -ut command will be:

bpclient -client <client_name> -update -offline -ut -onlineat 1339916400

NetBackup Commands Reference Guide  http://www.symantec.com/docs/DOC3684

If I get a chance, I will test a bit later in the day...

mph999
Level 6
Employee Accredited

This works ...

 

bpclient -M womble -client flump -update -ut  -offline -onlineat 1371632750
 
(the time is given in ctime format)
 
Martin

sksujeet
Level 6
Partner Accredited Certified

Just tried it and it works. If you just make it offline it will remaing offline till 2038 or give the timing. This is how it is in windows. This can also be done or verified from Master properties - client attributes

C:\Users\>bpclient -client XXX.eur.xl -update -current_hostname XXX.eur.xl -offline

C:\Users\>bpclient -client XXX.eur.xl -update -current_hostnameXXX.eur.xl -online

mph999
Level 6
Employee Accredited

This also works ...

bpclient -M womble -client flump -update  -offline -onlineat 06/20/2012

Doesn't appear you can give the hours/ mins/ seconds on the command line, unless you use the -ut option to givethe time in 'ctime' format.

So to give an exact time, use the ctime, to give just the 'day' use the 2nd command I showed.

Martin

 

Opps. Missed that bit out that marianne mentioned, need to add the client forst (mine was alreaded added, hence why I forgot).

Marianne
Level 6
Partner    VIP    Accredited Certified

This is what worked for me  (was a bit 'out' with the unixtime value):

/root >bpclient -client Marianne-Win7 -add

/root >bpclient -client Marianne-Win7 -update -offline -ut -onlineat 1339916400

/root >bpclient -client Marianne-Win7 -L
Client Name: Marianne-Win7
 Current Host:
        Hostname: Marianne-Win7
 Offline:       Yes
 Online at:     06/17/2012 09:00:00
 

Mark_Solutions
Level 6
Partner Accredited Certified

Was it specifically the command line option you were looking for?

Much easier to open the Master Server Host Properties - add the client in and set the offline time in there

Love command lines but also believe in making life easy!

Hope this helps

NIKHIL234656595
Level 6

Thanks ALL.

But how t convert time to Ctime.

 

So, if I need Client online 17 June 2012 @ 06:00, my -ut command will be:

bpclient -client <client_name> -update -offline -ut -onlineat 1339916400

 

17 June 2012 @ 06:00    ----> 1339916400

Ho to get 1339916400

Marianne
Level 6
Partner    VIP    Accredited Certified

I managed to find a couple of URLs via Google.

Example: http://soft.zoneo.net/Unixtime/index.php

 

Andy_Welburn
Level 6

Could've done with that link for a post a week or so back!

Mark_Solutions
Level 6
Partner Accredited Certified

I like this one - works both ways nicely:

http://www.onlineconversion.com/unix_time.htm