Results 1 to 9 of 9
  1. #1
    Newcomer
    Join Date
    Nov 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

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

    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. #2
    Senior Member GregE's Avatar
    Join Date
    May 2006
    Posts
    2,100
    Thanks
    9
    Thanked 17 Times in 16 Posts

    Default

    use REPLACE=NO in your restore command line.

  3. #3
    Newcomer
    Join Date
    Nov 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  4. #4
    Member
    Join Date
    Mar 2008
    Location
    Minden
    Posts
    169
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Default

    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.

  5. #5
    Newcomer
    Join Date
    Nov 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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.

  6. #6
    Moderator moon-buddy's Avatar
    Join Date
    Aug 2005
    Location
    Somewhere in the US
    Posts
    5,858
    Thanks
    4
    Thanked 228 Times in 223 Posts

    Default

    dsmc restore -pit=06/07/2012 -subdir=yes /dir/folder/file

    This should restore all files before 06/07/2012
    Ed

  7. #7
    Newcomer
    Join Date
    Nov 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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..

  8. #8
    Senior Member
    Join Date
    Dec 2004
    Location
    NC
    Posts
    200
    Thanks
    0
    Thanked 12 Times in 11 Posts

    Default

    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.
    "If we knew what it was we were doing, it would not be called research, would it?" -- Albert Einstein

  9. #9
    Newcomer
    Join Date
    Nov 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

Similar Threads

  1. Restoring files from a different Node in TSM 6.2 GUI/ Command Line
    By anandgmenon in forum Restore / Recovery Discussion
    Replies: 5
    Last Post: 07-12-2011, 05:48 PM
  2. hsm 5.5 migration - skip files on error
    By wat_tyler in forum Hierarchical Storage Management
    Replies: 1
    Last Post: 07-10-2008, 01:53 AM
  3. dsmc restore--option to skip all objects that already exist
    By Eng Tan in forum Restore / Recovery Discussion
    Replies: 7
    Last Post: 06-10-2008, 04:06 PM
  4. Command Line: Getting a list of files that would restore?
    By jkloek in forum Restore / Recovery Discussion
    Replies: 1
    Last Post: 04-15-2006, 09:43 AM
  5. Replies: 1
    Last Post: 10-15-2003, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •