Forum Discussion

noazara's avatar
noazara
Level 6
6 years ago

Netbackup script to check what all active clients do not have full backup from last 1 month

Hi ALL,

 

I need a Netbackup script to check what all active clients do not have full backup from last 1 month.(active clients only and not for clients which are in the deactivated policy)

 

or a SQL query for OPSCENTER Analytics will also help.

 

 

  • I need a Netbackup script to check what all active clients do not have full backup from last 1 month.(active clients only --- not for clients which are in the deactivated policy)

    I need only clinet details which are in the Activated policy only.

     

    I have VIP environment.Vmware backups using VIP(Query)

    or a SQL query for OPSCENTER Analytics will also help.

     

     

     

     

    • Michal_Mikulik1's avatar
      Michal_Mikulik1
      Moderator

      Hello,

      I use the SQL query below to report the last backups of every client/policy combination. To show Active clients only is a bit complex and tricky, because there are additional OpsCenter tables (domain_policy, domain_client, domain_policyclient) with relations between them and with many attributes indicating is thery are active, valid, in a policy, or retired..

      In addition, you use VIP in your policicies, so you cannot say in advance which client will be picked up in which policy. One client can be picked up by more policies, some of them can be active, some not... So I think it is a complex task for a SQL guru.

      So giving this SQL as a basic.

      select policyname,clientname,max(UTCBigInttoNomTime(starttime)) "LAST BACKUP"
      from domain_jobarchive
      where byteswritten>0
      and statuscode in (0,1)
      and policyname in
      (select name from domain_policy where active=1 and status=0 and isvalid=1 and name not like 'test%')
      group by policyname,clientname
      order by 3 asc

      regards

      Michal

      • noazara's avatar
        noazara
        Level 6

        Thanks for the opscenter SQL query but this is not fulfilling my aim.

         

        I need only those clients in the output which are in the active policies and dont have full backups from last 1 month.Not the clients which are in the deactivated policy.Only  the clients in the activated Policy.

         

        I have VIP also configured in the Environmrnt along with MS windows backups.

         

         

  • sksujeet

     

    please share the Windows Powershell script

     

    i have the list of clients with me in a client.txt file