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.

Command Line restore option to replcae all files except skip newer files

Discussion in 'Restore / Recovery Discussion' started by sh8827, Jul 11, 2012.

  1. sh8827

    sh8827 New Member

    Joined:
    Nov 30, 2008
    Messages:
    8
    Likes Received:
    0
    Hi all,

    I need to restore and replace about 200 GB of Data using a backup from a few weeks ago to its original location but do NOT replace the files or folders if there are newer. What are the command option. Once again I want to replace all the files and folders but if some of the files or folder are newer on the destination then it must skipped.

    Thanks for any help
     
  2.  
  3. GregE

    GregE Senior Member

    Joined:
    May 12, 2006
    Messages:
    2,100
    Likes Received:
    31
    use REPLACE=NO in your restore command line.
     
  4. sh8827

    sh8827 New Member

    Joined:
    Nov 30, 2008
    Messages:
    8
    Likes Received:
    0
    Thanks for the suggestion but it is skipping all files. I need it to replace all the files except for file that were created after 6/7/2012

    I also tried with -replace=yes which replaced all the files as expected

    Here is the command I use

    dsmc restore data:/CMAD/MGR/Competitions/ -pitd=6/7/2012 -pitt=18:00 -replace=no -subdir=yes -tapeprompt=no -verbose

    Thanks for your help again
     
  5. axisminden

    axisminden New Member

    Joined:
    Mar 18, 2008
    Messages:
    170
    Likes Received:
    4
    Location:
    Minden
    do you have try this:
    dsmc restore -ifnewer data:/CMAD/MGR/Competitions/ -pitd=6/7/2012 -pitt=18:00 -replace=no -subdir=yes -tapeprompt=no -verbose
    Go to Client Backup Cmd and type help restore ifnewer.
    maybe it is a option for you.
     
  6. sh8827

    sh8827 New Member

    Joined:
    Nov 30, 2008
    Messages:
    8
    Likes Received:
    0
    Yes I did try with the -ifnewer option but it skipped all the files!!

    Thanks for the suggestions

    Anybody else. I am sure it is something simple.
     
  7. moon-buddy

    moon-buddy Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,264
    Likes Received:
    282
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    dsmc restore -pit=06/07/2012 -subdir=yes /dir/folder/file

    This should restore all files before 06/07/2012
     
  8. sh8827

    sh8827 New Member

    Joined:
    Nov 30, 2008
    Messages:
    8
    Likes Received:
    0
    Try the last suggested command as shown

    dsmc restore data:/CMAD/MGR/Competitions/ -pitd=6/7/2012 -subdir=yes -tapeprompt=no -verbose

    And was prompted as shown

    Select an appropriate action
    1. Replace this object
    2. Replace all objects that already exist
    3. Skip this object
    4. Skip all objects that already exist
    A. Abort this operation

    Selected 2 as I want to replace all the files

    End result was it replaced every files including files that were newer than 06/07/2012

    I wish there was an option not to replace those newer files

    I need help..
     
  9. rmazzon

    rmazzon Senior Member

    Joined:
    Dec 6, 2004
    Messages:
    207
    Likes Received:
    17
    Occupation:
    TSM Managed Services Lead
    Location:
    NC
    I suppose an ugly approach would be to write a script that crawls through the directory tree looking for last write dates earlier than 6/7/2012, move them elsewhere and then perform the same restore but this time take option 4.
     
  10. sh8827

    sh8827 New Member

    Joined:
    Nov 30, 2008
    Messages:
    8
    Likes Received:
    0
    Thanks for the suggestion but it would be too much work. In addition we don't have the space to move them.

    Any other suggestions are welcome

    Thanks in advance
     

Share This Page