Forum Discussion

Baski's avatar
Baski
Level 5
12 years ago
Solved

Regular expression in NBU 7.5

Hi Team,

I want filter the NBU Jave GUI every day for some report.

Job Policy        regular expression    oradb.*|sqldb.*|exdb.*   ................it is working for me

and I need filter for schedule which starts from Application-weekly , Application-daily,Application-hourly ...etc

 

I am doing the above things as below

 

Job schedule    not equal to        application-hourly

Job chedule    not equal to        Application-Weekly

Job schedule    not equal to         client-hourly

....

.

.etc

 

How to get all information in single regular expression as Job Policy

 

Thanks for your help.

.

  • OK, now I get what you're trying to do.

    One first note, I believe the "regular expression" in Netbackup GUI is just a limited set of string filters, it is not as powerful as the native OS regular expression used for shell script.

    I said this becaues I have tried this before:

    1)  It will work if we just want to filter jobs (by policy/schedule/client etc.) by a string that matches anything starting with "abc*", "abc?", "^abc", "abc$", or like your first filter mutliple words that ends with same string.

    2)  It won't work if I am trying to do things like "inverter", which is of the syntax [^. For example, if I want to filter out job policy that is not starting with a or b, I will put in regular expression as [^ab] or even [^ab]* , but it didn't work.

    Maybe you test and let me know.

    A better idea, as mentioned before, is to filter out from bpdbjobs.

  • egrep -v "string1|string2|strring3" to exclude stated "strings" already mentioned in watsons earlier post

  • alternatively, if you are looking at excluding all "-hourly, -weekly, -monthly, -2hours, -4hours, -10hours", just do a:

    egrep -v "*ly|*hours" 

  • Sounds like a job for Opscenter!

    Its free in the basic form and you can run reports, graphs, groups, emails etc to your hearts content.

    It could be overkill in this case, but worth a go.

    Jim

  • If you want to automate this you will need to do it through CLI and a small script, if you want do it daily then the Java GUI will work, but honestly who wants to do a repetitive work every single day, let the machine do it for you, using OpsCenter or NBU Commands is the best solution.

  • Hi Watsons,

    The filter gives error. might be I am using on Solaris 10.

     | egrep -v "*ly|*hours"
    egrep: syntax error
     

    no worries I am searching the option in google.

     

    Hi Omar, Thansk for comments here. We have opcenter, but  loading the GUI  will take minimum 1 hour some time might be two hours. So, it is very difficult for us. ( the server is in remote country )

     

     

     

  • Hi Team,

     

    Thanks for valueble solution here. Speacial thanks to Watsons and Andey,

     /usr/openv/netbackup/bin/admincmd/bpdbjobs -report -U -t 08/04/2013 17:30:00 | egrep 'oracle.*|sql-bds.*|ottr-M.*|svabd.*|mokk.*|sap.*'|egrep -v 'Application-Hourly|bsw-hourly|Client-Hourly|bsw-Hourly|Client-hourly|mett-Hourly|Client-2Hourly|Application-2Hourly|Application-hourly|Ubs-Daily|Application-Weekly|Application-hourly' |awk '{print $2,$3 ,$4 ,$5,$6,$7}'|uniq |grep -i "active" |awk '{print $3}'| uniq
     

    The above filter shows only active backp from August 4th after 5: 30 PM.

    offcourse we can filter like " hourly or Hourly .." will try those things..

    My second target to calculate the ETA for each backup ( means how much time will take). I need compare each stream with respective disk ( how much used) with respective speed....etc

     

    Thanks Omar,Jim and Wr for your comments here.

     

    Cheers