Commvault & Powershell for reports/Vault Tracker

Last post 10-20-2010, 4:09 PM by Stephanie Fuller. 12 replies.
Sort Posts: Previous Next
  • Commvault & Powershell for reports/Vault Tracker
    Posted: 06-28-2010, 2:59 PM

    Does Commvault have the ability to have any reports configured and executed via powershell scripting?  I need to automate an uploading of tapes for reuse report with our offsite storage facility. 

     

    Thank you.

  • Commvault & Powershell for reports/Vault Tracker
    Posted: 06-28-2010, 3:20 PM
    Hello BFDP_Michael,



    Are you familiar with Vault Tracker and the features that it offers?

    http://documentation.commvault.com/commvault/release_8_0_0/books_online_1/english_us/features/vault_tracker/vault_tracker.htm

    Matt
  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-28-2010, 3:39 PM

    no, I suppose I'm not all that familiar with it.  The last company I was with never used it.  This company uses it but I didn't know it could be set up to automatically run each day to save the report.  I've only executed the reports manually.

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-28-2010, 3:46 PM

    Michael,

    You might consider writing a sql query for the specific data that you need.  This would be a good way to schedule the job whenever.

    I wrote this script to show me which tapes should be aged off, but still contain valid data.  You could change a few of the variables to find the tapes you need outside your library. 

    Thanks

    -Chris

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-28-2010, 8:29 PM
    Michael,

    I would suggest a review of Vault Tracker, and then update the thread with any remaining questions, though I’m sure you will find that it does address your needs.

    Matt
  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 8:23 AM

    I'll read through the documentation and go for setting that up. 

     

    Thank you.

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 8:25 AM

    Hi Chris.  The attachment isn't there.  Getting a directory not found error.

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 1:40 PM

    Just save this as an ASCII file.  You will need to change your LibraryID.

     

    -- Find all media over 30 days old
    declare @barCode                varchar(256)
    declare @lastBackupTime            varchar(256)
    declare @retentionExpireTime    int
    declare @aging                    int
    declare @today                    int
    declare @BackupTime                datetime
    declare @RetentionTime            datetime
    select @aging = 30 * 24 * 60 * 60  -- setting to 30 days (30 days * 24 hrs * 60 min * 60 sec)
    set @today = datediff(s,'jan 01 1970',getdate())

    /* select BarCode, dateadd(s, LastBackupTime + (60 * 60 * -6), 'jan 01 1970') as 'LastBackupTime',
        LibraryId, dateadd(s, retentionExpireTime + (60 * 60 * -6), 'jan 01 1970') as 'RetentionExirapion'
        from mmMedia where libraryId = 277 and LastBackuptime < (@today - @aging) and mediaLocation = 1 and isAged = 0
        order by barcode  */

    print 'Barcode      BackupTime           RetentionTime'
    print '-----------------------------------------------'
    declare MediaCursor cursor
    for
    select BarCode, LastBackupTime, retentionExpireTime    from mmMedia where libraryId = 277
        and LastBackuptime < (@today - @aging) and mediaLocation = 1 and isAged = 0
        and retentionExpireTime not like '0'
        order by barcode

    open MediaCursor

    fetch next from MediaCursor
    into @barCode, @lastBackupTime, @retentionExpireTime

    while @@fetch_status = 0
    begin
        declare @info varchar(255)
        declare @info2 varchar(255)    
        set @backupTime = dateadd(s, @lastBackupTime + (60 * 60 * -6), '01/01/1970')
        set @retentionTime = dateadd(s, @retentionExpireTime + (60 * 60 * -6), '01/01/1970')
        set @info = @backupTime
        set @info2 = @retentionTime
        if @retentionExpireTime > (@today + 2*@aging)
            print @barcode + ' | ' + @info + ' | *** Offsite Media ***'
        else
                    print @barcode + ' | ' + @info + ' | ' + @info2
        fetch next from MediaCursor
        into @barCode, @lastBackupTime, @retentionExpireTime
    end
    close MediaCursor
    deallocate MediaCursor

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 1:42 PM

    If you need the LIbrary ID, you can run this.

     

    select aliasName,
        libraryid,dateadd(s, libraryInstallTime + (60 * 60 * -6), 'jan 01 1970') as 'LibraryInstallTime',
        LibraryVendor,LibraryModel,FirmwareRevision,SerialNumber, WWNNumber,descript
      from mmlibrary
      order by aliasName

  • Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 9:01 PM
    Hi

    Job summary report can be run via command line in 8.0. And most reports in 9.0 can be run via command line.

    Thanks

    Rahul
  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-29-2010, 9:39 PM

    BFDP_Michael,

    CV has its own command line interface that you can use.

    From the CLI you can run a Vault tracker policy that will generate the report. See link below.

    http://documentation.commvault.com/commvault/release_8_0_0/books_online_1/english_us/features/cli/cli.htm#vaulttracker

     

    Aaron

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 06-30-2010, 9:17 AM

    Thank you to everyone for the helpful comments.  I've scheduled the Vault Tracker to run the report for me and place it in a folder of my choosing.  This seems to be working well so far.

     

    Thank you,

     

    Michael

  • Re: Commvault & Powershell for reports/Vault Tracker
    Posted: 10-20-2010, 4:09 PM

    This thread is old now, but I'm new to CommVault and am not finding Vault Tracker to be as helpful as promoted.  I would like to use Vault Tracker to export tapes within a given week range, for offsite storage.  However, it seems to not have that capability.  Does anyone have any suggestions on finding, selecting and exporting tapes from 2 weeks back???  A media report will tell me this, but then we have to manually browse, select and export those media.

    And, to complicate matters, it looks like we will be running different groups of clients on different weekly rotations, with full backups scheduled on different days.  So if I want to export an entire week of those client's backups (full + incr), is there a slick way to find the tapes in that date range for each of those groups/media pools?

    Thanks in advance,

    Stephanie

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy