cancel
Showing results for 
Search instead for 
Did you mean: 

Stop backup for a specific timeframe in the future (not from now till...)

Michele_Nicosia
Level 5

Hi all,

   today i have a new question for the great experts around here.

I'm using Netbackup 7.5.0.5 on Linux master and media, with a bunch of Windows clients.

For specific maintenace reasons on the windows clients  i need to stop backup.

I know i can:

A) Use calendar, add excluded DAY (entire)

B) using the clients list, adding OFFLINE time from NOW till the FUTURE (time/date)

 

What I miss (and it would be very helpful) is to have opportunity of add a TIMEFRAME , let's say client1 will be offline from 20th December midnight till 22nd December noon , while today is the 11th!

Without having it as an internal NBU feature, i would like to add an AT or Cron job to start at specific time and use the OFFLINE feature from now till the 22nd, in other word, i might use a command line action, instead of the GUI, might be possible?

But that's only an idea.

Any help will be greatly appreciated.

Thank you.

Kind Regards,

 

Michele

2 ACCEPTED SOLUTIONS

Accepted Solutions

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

yes , you should be able to do using the cron using the bpclient command to offline the client

but you need to use the unix time to make the client online 

below is the example..

you can add this to cron job to run at Dec 20, and it will online the client at Dec 22, 2014 

bpclient  -client clientname -update -ut  -offline -onlineat 1419206400

you can use some online coverts to convert the unix time staps

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

View solution in original post

Michele_Nicosia
Level 5

Hello,

  thank you all, it's exaclty what i was lookign for.

I've done some script to help me in the matter, so , no need to use external links (in unix) to convert time.

 

For who interested, here it is:

 

#!/bin/sh
timestamp=$( date -d "$2" "+%s" )
for i in "$1.extension"; do
bpclient -client $i -update -offline -ut -onlineat $timestamp
done 

 

So, using a command like  script.sh client "2014/12/31 05:00:00" i can put offline till the date.

To start it in a later moment, i will use a normal AT command, or cronjob as you prefer.

 

 

Thank you again.

 

Regards,

 

Michele

View solution in original post

5 REPLIES 5

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

yes , you should be able to do using the cron using the bpclient command to offline the client

but you need to use the unix time to make the client online 

below is the example..

you can add this to cron job to run at Dec 20, and it will online the client at Dec 22, 2014 

bpclient  -client clientname -update -ut  -offline -onlineat 1419206400

you can use some online coverts to convert the unix time staps

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

Nicolai
Moderator
Moderator
Partner    VIP   

Command line:

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

Example taken from 

https://www-secure.symantec.com/connect/forums/command-make-client-offline-netbackup#comment-7275581

 

mph999
Level 6
Employee Accredited

Command line via cron is only way I can think of:

Couple of examples:


bpclient -M womble -client mhwin2008 -ut -offline -onlineat 1418227000

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

Michele_Nicosia
Level 5

Hello,

  thank you all, it's exaclty what i was lookign for.

I've done some script to help me in the matter, so , no need to use external links (in unix) to convert time.

 

For who interested, here it is:

 

#!/bin/sh
timestamp=$( date -d "$2" "+%s" )
for i in "$1.extension"; do
bpclient -client $i -update -offline -ut -onlineat $timestamp
done 

 

So, using a command like  script.sh client "2014/12/31 05:00:00" i can put offline till the date.

To start it in a later moment, i will use a normal AT command, or cronjob as you prefer.

 

 

Thank you again.

 

Regards,

 

Michele

Nicolai
Moderator
Moderator
Partner    VIP   

Thanks for sharing that piece of code - True Connect spirit :)