1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above 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 notice will disappear after you have made at least 3 posts.

Restore both active AND inactive files

Discussion in 'Restore / Recovery Discussion' started by opeth, Jul 26, 2017.

  1. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    All, I have a situation where I need to restore all active and inactive files for a number of folders that are in permenant retention. I am unsure if there is a good/easy way to do this. Anyone ever had to do this? Any ideas?
     
  2.  
  3. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,564
    Likes Received:
    358
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    You can't do it. If you specify -inactive, it will restore the active file if it exist, for deleted files, it will restore the most recent inactive.

    Here, I have 3 version of this file:
    Code:
      Size  Backup Date  Mgmt Class  A/I File
      ----  -----------  ----------  --- ----
      8,761  B  07/26/2017 10:28:21  DEFAULT  A  \\lanteigne\c$\test\test1.txt
      8,761  B  07/26/2017 10:26:19  DEFAULT  I  \\lanteigne\c$\test\test1.txt
      8,761  B  07/26/2017 10:26:30  DEFAULT  I  \\lanteigne\c$\test\test1.txt
    If I restore using: dsmc restore c:\test\test1.txt -inactive It restores 1 file:

    Code:
    Restoring  8,761 \\lanteigne\c$\test\test1.txt [Done]
    Restore processing finished.
    Total number of objects restored:  1
    Total number of objects failed:  0
    Total number of bytes transferred:  8.77 KB
    Data transfer time:  0.02 sec
    Network data transfer rate:  407.53 KB/sec
    Aggregate data transfer rate:  3.78 KB/sec
    Elapsed processing time:  00:00:00

    It doesn't restore all the files because if it did, it would just keep overwriting them until it restores the last one. For that reason, it restores the most recent version.
     
  4. Harry_Redl

    Harry_Redl Moderator ADSM.ORG Moderator

    Joined:
    Dec 29, 2003
    Messages:
    2,274
    Likes Received:
    137
    Occupation:
    IT Consultant
    Location:
    Czech Republic
    Hi,
    try the "-latest" option

    Harry

    EDIT: sorry, misread the question - if you need to restore ALL the active/inactive versions of ONE file then this does not help - problem is you would need to rename the versions to prevent file being overwritten (as marclant pointed out) - which TSM cannot do by itself
     
  5. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,564
    Likes Received:
    358
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    He wants to restore all versions, which is not possible.
     
  6. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    Yea I know out of the box this wont work, just wondering if there is a workaround to possibly rename the file with the date it was marked inactive or something.
    Guess not.

    Related question, is there a way to restore all inactive files (not versions) that don't currently have a active version? (deleted files that don't have an active version with same name) with dsmc restore?
     
  7. moon-buddy

    moon-buddy ADSM.ORG Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,829
    Likes Received:
    358
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    As Harry and marclant said, it is not possible to do restore in one pass. Restore files one-by-one and renaming them as you go along.
     
    DanM likes this.
  8. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    Right I understand, might be able to do some powershell magic and script it, but see my second question above... im doubting that is possible either but just wanted to ask the community here before I jump into a ton of work
     
  9. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    dsmc restore c:\test\* -inactive <-------this for example, wont JUST grab the latest inactive files that don't have a active version, right?
     
  10. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,564
    Likes Received:
    358
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    It will grab the active for files that have an active version and the latest inactive for files that do not have an active. If you look at my example, I had an active and it restored it.
     
  11. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    It will grab the active for files that have an active version and the latest inactive for files that do not have an active. <---THAT is what I was looking for. That will work and saves me some headache
     
  12. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    Thanks for your help marclant
     
  13. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,564
    Likes Received:
    358
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    Sorry, you should use -latest for that. Here's from the help on inactive:
    upload_2017-7-27_10-25-46.png
     
  14. opeth

    opeth ADSM.ORG Member

    Joined:
    Feb 3, 2016
    Messages:
    81
    Likes Received:
    0
    ha wow ok good catch. Thanks again
     

Share This Page