ADSM-L

Re: [ADSM-L] Inactive active filesystem for vm in script

2017-06-27 15:35:14
Subject: Re: [ADSM-L] Inactive active filesystem for vm in script
From: Ron Delaware <ron.delaware AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 27 Jun 2017 12:34:03 -0700
Robert,

As you can see there are more that a few way to get the info I will add a couple more for you tool box.  You can create a macro or a script to do the same thing. You would have to translate the VM verbage into TSM and use select statement like Neil did.  The translation would be as such:

vm bodev-ina = node_name='BODEV' state='INACTIVE_VERSION'

The select statement would look like this

select node_name as node, filespace_name as drive, hl_name as directory, ll_name as filename, state, deactivate_date, class_name as mgmtclass from backups where node_name='BODEV' and type='FILE' and state='INACTIVE_VERSION'

the output would look like this

           NODE: BODEV
          DRIVE: \\bodev\c$
      DIRECTORY: \USERS\BODEV\DOWNLOADS\DOCUMENTS\
       FILENAME: PERSONALHEALTHRECORD_5241501C-A51F-4D05-8E9F-56A2A90B30B7.PDF
          STATE: INACTIVE_VERSION
DEACTIVATE_DATE:
      MGMTCLASS: DEFAULT

           NODE: BODEV
          DRIVE: \\bodev\n$
      DIRECTORY: \FILEHISTORY\BOB\FASTER\DATA\C\USERS\BOB\VIDEOS\
       FILENAME: BICEPBARBELLS (2016_04_18 03_30_08 UTC).MP4
          STATE: INACTIVE_VERSION
DEACTIVATE_DATE:
      MGMTCLASS: DEFAULT

You would then be able to save that select command to a script with the define script command within TSM or if you saved it to a file you could run it as a macro or use the file to create the script.  You could even use variables in place of hard coding specific names for the Node and state if you wanted to. As I stated, there are numerous ways to get the info you are looking for.

This is probably more information than you are looking for but it gives you an idea of what you could do if you wanted to.



Best Regards,

_________________________________________________________

Ronald C. Delaware
Senior Consultant
IBM Corporation | System Lab Services
925-476-5315 (Office)
925-457-9221 (cell phone)
mailto:ron.delaware AT us.ibm DOT com
  




From:        "Schneider, Jim" <JSchneider AT ESSENDANT DOT COM>
To:        ADSM-L AT VM.MARIST DOT EDU
Date:        06/27/2017 11:01 AM
Subject:        Re: [ADSM-L] Inactive active filesystem for vm in script
Sent by:        "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>





An alternative can be run from the backup proxy server.
dsmc restore vm bodev -pick -inactive

Jim Schneider
Essendant

-----Original Message-----
From: ADSM: Dist Stor Manager [
mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of Schofield, Neil (Storage & Middleware, Backup & Restore)
Sent: Tuesday, June 27, 2017 12:33 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Inactive active filesystem for vm in script

Classification: Public

Robert

I'm not sure this is the best answer to your question, but in the absence of any other replies I thought it might at least prompt somebody to come up with something better.

I'm assuming here that your hypervisor is vSphere and not Hyper-V? In which case empirical evidence from my systems suggests that for every backup of a snapshot of the VM called bodev, I get one bodev.ovf backup object.

I would normally shy away from running Selects against the Backups table, so use the following at your own risk. However to determine how many snapshots you've got stored for the VM called bodev, maybe try something like the following?

SELECT COUNT(*) FROM BACKUPS WHERE FILESPACE_NAME='\VMFULL-bodev' AND LL_NAME LIKE '%.ovf'

It looks like all versions of bodev.ovf will show as Active versions, but perhaps you can just assume the number of inactive backups is 1 less than the total?

Regards

Neil Schofield
IBM Spectrum Protect SME
Backup & Recovery | Storage & Middleware | Central Infrastructure Services | Infrastructure & Service Delivery | Group IT LLOYDS BANKING GROUP ________________________________



Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 03457 801 801. Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales 2299428. Telephone: 0345 603 1637

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Cheltenham & Gloucester plc is authorised and regulated by the Financial Conduct Authority.

Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester Savings is a division of Lloyds Bank plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

**********************************************************************
Information contained in this e-mail message and in any attachments thereto is confidential. If you are not the intended recipient, please destroy this message, delete any copies held on your systems, notify the sender immediately, and refrain from using or disclosing all or any part of its content to any other person.




<Prev in Thread] Current Thread [Next in Thread>

ADSM.ORG Privacy and Data Security by KimLaw, PLLC