1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

VMDK backup/restore query script

Discussion in 'Scripting' started by Cxloud, Feb 11, 2011.

  1. Cxloud

    Cxloud New Member

    Joined:
    Mar 26, 2010
    Messages:
    17
    Likes Received:
    0
    Occupation:
    Service Operations Technician
    Location:
    Greater London, UK
    Hi all,

    I currently have a script on TSM that a colleague of mine has written a script for checking the success/failure of our VMDK backups and restores, the only issue with this script is that it doesn not report the actual names of the servers, there are different servers backed up on different days, I was wondering if possible someone could look at this script and see if there is a way for it to output the server names as well as what it already reports.

    Here's the script:
    Code:
    select count(*) as BACKUP_VMDK from summary where entity='SUESX_VMDK' and activity='BACKUP' and date(start_time)='$1' and SUCCESSFUL='YES' 
    select count(*) as RESTORE_VMDK from summary where entity='SUESX_VMDK' and activity='RESTORE' and date(start_time)='$1' and SUCCESSFUL='YES' 
    select date(start_time) str_date, time(start_time) str_time, date(end_time) as end_time, time(end_time) end_time, activity, successful from summary where entity='SUESX_VMDK'  and (activity='BACKUP' or activity='RESTORE') and date(start_time)='$1' 
    Any and all feedback is appreciated.
    Thanks.

    CX
     
  2.  

Share This Page