Forum Discussion

PNabski1's avatar
PNabski1
Level 3
4 years ago
Solved

Wild cards availability when using command line input

Good Morning,

Netbackup 8.0  - Are there any wild cards available to use when inputting queries on command line such as  bpimagelist.

Kind Regards

Pete

  • Hi quebek,

    Many thanks for the info , guess its no lazy way out then :)

    Much Appreciated 

    Pete

  • PNabski1's avatar
    PNabski1
    4 years ago

    Hi jnardello,

    Thanks again for some more ideas. Great community this. You can get answers to your problems and also get educated at the same time.

    Kind Regards

    Pete

     

6 Replies

  • Hey

    I think you have to be specific - no * nor ??

    • PNabski1's avatar
      PNabski1
      Level 3

      Hi quebek,

      Many thanks for the info , guess its no lazy way out then :)

      Much Appreciated 

      Pete

  • While there aren't any wildcards available, it's usually possible to generate a query that's far-reaching enough to capture multiple data points - heck, usually the problem is TOO MANY returns, not too few. =) If nothing else, if you were looking for images from two particular policy types for example, you could always redirect the bpimagelist outputs to the same file and then just process that a single time. Or throw the policy types you care about in as loop variables and run the same command multiple times automatically, etc. 

    i.e. bpimagelist -pt Oracle -hoursago 12 > /tmp/output
    bpimagelist -pt Informix -hoursago 12 >> /tmp/output

    If you can provide some details on what you're looking for we can see if we can help. 

    • PNabski1's avatar
      PNabski1
      Level 3

      Hi jnardello,

      Many thanks for coming back with some additional alternatives. To give an idea of the NetBackup policy naming conventions that have been set up please see examples below. There have also been policies created where three letter codes have been used for a specific customer for example PL-DPD-Vstorage-xxxx. When using the admin console its easy to filter out specific policies that ran overnight with things like  PL-DPD* in the job policy field so was wondering if wild cards like " * " could somehow be used in the command line when getting information via things like bpimagelist.

      PL-UK-Vstorage-xxxxxx
      PL-UK-Agent-xxx
      PL-Int-Exchange-xxx
      PL-Ext-SQL-xxx

      Kind Regards

      Pete

      • jnardello's avatar
        jnardello
        Moderator

        Yeah, no wildcards like that - but there's nothing saying you can't daisy-chain your commands to use something else that DOES support them. =)

        bpimagelist -hoursago 24 -U | egrep "Backed Up|-\-\-\-\-|PL-DPD"

        (The extra stuff in the egrep is to preserve the output header lines.)