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.

restore only latest copy of a file

Discussion in 'Restore / Recovery Discussion' started by benlynch, Oct 11, 2012.

  1. benlynch

    benlynch New Member

    Joined:
    Oct 10, 2012
    Messages:
    12
    Likes Received:
    0
    dsmc -replace=yes retrieve {/tmp}/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax
    IBM Tivoli Storage Manager
    Command Line Backup/Archive Client Interface
    Client Version 5, Release 3, Level 4.0
    Client date/time: 10/11/12 13:55:32
    (c) Copyright by IBM Corporation and other(s) 1990, 2006. All Rights Reserved.

    Retrieve function invoked.

    Retrieving 1,664,000 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 209,920 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 1,664,000 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 209,920 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 1,664,000 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 209,920 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 1,664,000 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 209,920 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]
    Retrieving 1,664,000 /tmp/archiveDir/01_87~WWBYT0G000SWR1~V1.1.pax [Done]


    I want to get just the latest file, not all of them... and what is it even doing when it grabs all of them? overwriting the same file over and over? what the heck :)
     
  2.  
  3. rmazzon

    rmazzon Senior Member

    Joined:
    Dec 6, 2004
    Messages:
    207
    Likes Received:
    17
    Occupation:
    TSM Managed Services Lead
    Location:
    NC
    The command you give is to retrieve an archived file, not to restore a backed up file. They are not the same concept. If the file was backed up (via dsmc incr or dsmc sel) use the dsmc restore command and then only the active version will be restored. If the file is only archived (via dsmc arch) then you need to specify an option like desc= or fromdate= to narrow down which one one want.
     
  4. benlynch

    benlynch New Member

    Joined:
    Oct 10, 2012
    Messages:
    12
    Likes Received:
    0
    ah, thanks. So there's no way to specify 'most recent'?

    Also, I noticed when i call dsmc incr to back up a file, and specify the full path to 1 actual file, it actually goes to the root directory of that file, then lists all files in all subdirectories, and uses the filename i specified as a filter... so for example if I have a these 3 files:

    /tmp/myfile
    /tmp/subdir/myfile
    /tmp/subdir/not_myfile

    And I specify that I want to backup /tmp/myfile (dsmc incr /tmp/myfile) it will back up /tmp/subdir/myfile too... is there an option that allows me to specify that I am giving it the full path and name of 1 single file that I want backed up?
     
  5. rmazzon

    rmazzon Senior Member

    Joined:
    Dec 6, 2004
    Messages:
    207
    Likes Received:
    17
    Occupation:
    TSM Managed Services Lead
    Location:
    NC
    You can specify a particular archive if you know the date or if you supplied a description as part of the "dsmc archive" command. Use the "query archive" client command to see what is available.

    Unless there are links involved the "dsmc incr" command should only back up /tmp/myfile.

    Forgot to mention you can use the -pick option with the dsmc retrieve command and just pick the one you want from the list.
     
    Last edited: Oct 15, 2012
  6. domino

    domino Senior Member

    Joined:
    Nov 16, 2005
    Messages:
    720
    Likes Received:
    32
    Occupation:
    System Engineer
    Location:
    Germany
    The latest option is your friend - to restore the most recent backup version of a file

    for example
    dsmc restore "/tmp/myfile/*" -latest
     

Share This Page