spillar1

updated

20 years ago

S

spillar1

4 Posts

0

847

June 2nd, 2006 15:00

NetWorker 7.1.2 mminfo report to exclude a client

Hello - is there a way to produce an mminfo rpt that wil exclude tapes that contain a certain client? I need a 'client not equal' type function.
  • DavidHampson

    2 Intern

    1080 Posts

    434

    0

    Posted June 5th, 2006 06:00

    You should be able to use:

    mminfo -q client=!clientname
  • spillar1

    4 Posts

    434

    0

    Posted June 2nd, 2006 16:00

    Not directly, but you can use something like report
    for all the client where you will use grep -v for
    client you don't wish to have in reported (under
    assumption that client name will be included in
    report).


    By using the grep -v command (and please state how), will my end result be a rpt with only the tapes that exclude the client? Or will I have another rpt (from grep) showing the tapes that include the client, and then I have to remove them from the mminfo rpt? If that is true, that would be the equivalent of running 2 mminfo rpts - 1 to show all the tapes and clients, and another rpt only showing just the tapes that include that client. Then, I would have to manually mark off the tapes on the first rpt. I don't mind running as many rpts as I have to run, as long as the end product is 1 rpt that excludes that client, without manually removing them. Of course, that is, if this is even possible. Thanks
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    434

    0

    Posted June 2nd, 2006 16:00

    Not directly, but you can use something like report for all the client where you will use grep -v for client you don't wish to have in reported (under assumption that client name will be included in report).
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    434

    0

    Posted June 2nd, 2006 17:00

    ... and if you are unlucky to have to run this on Windows and do not gave grep - there is findstr command - where grep -v is the same as findstr /V (if I remember correctly).
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    434

    0

    Posted June 2nd, 2006 17:00

    Another approach would be to list all the clients you wish to have report for in one file and then run mminfo query in while do loop against that file... as I said, possibilities are endless.
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    434

    0

    Posted June 2nd, 2006 17:00

    If this is a UNIX system grep command will check for pttern you specify. If you specify grep -v it will exclude that. For example:

    mminfo -avot -r name,client,volume

    name client
    / client1 ABC123
    /var client1 ABC124
    C: client2 ABC125
    D: client2 ABC126

    If I do now mminfo -avot -r name,client | grep -v client1 - I will get:
    C: client2 ABC125
    D: client2 ABC126

    At the end it all comes down to question: is it faster to to exclude the clients like:
    mminfo query | grep -v client1 | grep -v client2 | grep -v client3 | etc

    or do mminfo query per each client.

    This will obviously depend on total number of client you have and the number you wish to exclude or include.
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    434

    0

    Posted June 2nd, 2006 17:00

    Of course, some people will find that easiest way for them is to do query against all the clients and then load it to Excel, sort if by client name and remove clients you don't need from there. Possibilities are endless.
  • spillar1

    4 Posts

    434

    0

    Posted June 5th, 2006 07:00

    Mr. Hampson;
    That's what I was looking for. I was using the ! parm incorrectly. Unfortunately, at least for me, the MAN page on mminfo is not too clear. I interpreted it as saying I should use !client = clientname. Thanks you for the clarification; this works just fine.
  • DavidHampson

    2 Intern

    1080 Posts

    434

    0

    Posted June 5th, 2006 07:00

    I think the man pages are not correct in this instance! Glad to have clarified things!
  • spillar1

    4 Posts

    40

    0

    Posted June 5th, 2006 11:00

    I think the man pages are not correct in this
    instance! Glad to have clarified things!


    OOPS - spoke too soon. The parms u gave me only work when list every client in the query, and exclude the one i don't want.