Forum Discussion

noazara's avatar
noazara
Level 6
2 years ago

need opscenter query to find which all clients DONT have backups for last 4-5 days

need opscenter query to find which all clients DONT have backups for last 4-5 days

NBU 9.1

i just need to have the list of clients which dont have successfull backups for a week in NBU.

  • I dont need the backup error codes which have failed in last 1 week

     

    I just need the list of clients which dont have successfull backup in Netbackup Catalog from 1 week.

    • noazara's avatar
      noazara
      Level 6

      Thanks Slartybardfast

      I dont need the backup error codes which have failed in last 1 week. That report i have.

      I just need the list of clients which dont have successfull backup in Netbackup Catalog from 1 week.

  • Hello,

    the query will depend on backup policy type. Lets assume "VMware", so policy type = 40. This is a query which shows last backups for predefined retentions. So you should play with it a bit, using for example HAVING phrase to pick up only backups older than X days, or omitting retention column.

    select 'VMware' "TYPE",substring(b.imageid,1,length(b.imageid)-11) "CLIENT",
    (case c.scheduletype
    when 0 then 'Full'
    when 1 then 'DifInc'
    ELSE 'Unknown'
    END) as "SCHED",
    d.retentionlevel "RET",
    (max(c.writestarttime)/10000-getGregorianUnixOffset())/1000 "LAST BACKUP TIME"
    from domain_jobimage b, domain_image c, domain_imagecopy d
    where
    b.imageid=c.id
    and
    c.id=d.imageid
    and

    c.policytype=40
    group by TYPE,CLIENT,SCHED,RET having "LAST BACKUP TIME">1670000000
    order by TYPE,CLIENT,SCHED,RET

    regards

    Michal

  • Thanks a lot.

    I tried to play with it but not getting the correct parameters.

     

    i am looking for like below when i run the SQL query it should give like:

     

    Client NamePolicy NO backup from last 7 daysLast Backup Date
        
        
        
  • Hello,

    thats customization is rather about SQL syntax than NetBackup topic and is beyond the scope of this forum. Check public SQL documentation and OpsCenter schema document.

    Regards

    Michal

  • Thanks..

     

    I will be really grateful if anyone helps me on this.

     

    We have a big problem going on with this in the environment.

  • i have find below in schema document

    please help in structuring the SQl query