12-10-2014 06:41 AM
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
Solved! Go to Solution.
12-10-2014 07:21 AM
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
12-12-2014 04:11 AM
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
12-10-2014 07:21 AM
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
12-10-2014 07:24 AM
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
12-10-2014 07:26 AM
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
12-12-2014 04:11 AM
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
12-15-2014 07:02 AM
Thanks for sharing that piece of code - True Connect spirit :)