Forum Discussion

nikenbu's avatar
nikenbu
Level 2
3 years ago

need command for NBU

Hi ALL,

 

NBU 8.1.2.

I have 1000 clients in the environment.

 

I want to know that what all client dont have full backup ran in past 3 days.

 

I am using below command but it is showing me all clinet names in the file.

 

I need to know the command which can give what all clients do not have the backups in last 3 days.

 

I am using below command currrently.


 for i in `cat client13feb2022.txt`;do echo "Client:$i";./bpimagelist -d 02/10/2022 00:00:00 -e 02/13/2022 00:00:00 -client $i -l | awk '/^IMAGE/ {print $2, $7, $11}' | egrep -i "week|Full"; done

 

 

  • you need to add to awk the $12 column. Which is the schedule type.

    OR add to your bpimagelist command the following option

    -st sched_type

    Specifies a schedule type for the image selection. The default is any schedule type. Valid values are as follows:

    FULL (full backup)
    INCR (differential-incremental backup)
    CINC (cumulative-incremental backup)
    UBAK (user backup)
    UARC (user archive)
    NOT_ARCHIVE (all backups except user archive)

     

    https://www.veritas.com/support/en_US/article.100017904

     

     

     

    • nikenbu's avatar
      nikenbu
      Level 2

      Hi Stefanos M,

       

      [root@admincmd]# for i in `cat client13feb2022.txt`;do echo "Client:$i";./bpimagelist -d 02/10/2022 00:00:00 -e 02/13/2022 00:00:00 -client $i -l -st FULL | awk '/^IMAGE/ {print $2, $7, $11}' | egrep -i "week|Full"; done

       

      Client:A
      no entity was found
      Client:B
      no entity was found
      Client:C
      no entity was found
      Client:D
      D pol1 Weekly_Full
      Client:E
      E pol2 Weekly_Backup_Full
      E Pol3 Weekly_Backup_Full
      Client:F
      no entity was found

       

       

      I need the command which i run ,will give result like:

       

      Below clients backup did not run in the mentioned time frame

      xy

      z

      v

      g

      h

       

       

      Thanks

       

      • davidmoline's avatar
        davidmoline
        Level 6

        HI nikenbu 

        Use the return code from bpimagelist to determine whether a client has had the required backup or not. A return code of 0 implies there is something, and return code of 227 means nothing found. 

        So something like this

         

        echo "Below clients backup did not run in the mentioned time frame:"
        for i in `cat clients13feb2022.txt`;do
           bpimagelist -d 02/10/2022 00:00:00 -e 02/13/2022 00:00:00 -client $i -l -st FULL >/dev/null 2>&1
           if [ $? -ne 0 ]; then
              echo $i
           fi
        done

         

        Cheers
        David

    • nikenbu's avatar
      nikenbu
      Level 2

      Thanks Nicolai.

       

      We are not using opscenter because of some management and security reasons.