dsmc restore--option to skip all objects that already exist

Eng Tan

Active Newcomer
Joined
May 14, 2008
Messages
8
Reaction score
0
Points
0
Hi,

I have a script that reads an input file for all directories to be restored that runs for a long time. Is there a way to parse in the option in the dsmc restore command to skip all objects that already exist? Since some files already exist, it prompts for action.

for i in `cat /tmp/inputfile`
do
dsmc restore -virtualnode=server_name "${i} -subdir=yes
done

Thanks
 
Take a look at the replace option. You can set it to things like "no", which is probably what you want, "prompt" which is what you have and "ifnewer" which sounds cool but may not meet your requirements, depending on how some of the files got there in the first place (same goes for "yes", obviously)..

PJ
 
Thanks. I think that will work. Do you know of a website that has the TSM manuals? The help menu is very scant on details

Thanks
 
filelist

You should do this instead of the shell loop. You are logging in and out of TSM each time you loop:

You have this:
for i in `cat /tmp/inputfile`
do
dsmc restore -virtualnode=server_name "${i} -subdir=yes
done

and should do this...

dsmc restore -virtualnode=server_name -filelist=/tmp/inputfile -replace=no

I'm not sure what's in /tmp/inputfile but if it's a list of directories or files, one on each line, it should work.
 
PJ,

Waht is the option to replace files during the dsmc restore only if the backup are newer? The ifnewer option in -replace=ifnewer does not work--it says invalid option.

Thanks
 
Just sent you a private message about this. Ifnewer is in itself an option and not a value for replace.

PJ
 
Thanks. Needed -ifnewer and -replace=yes to only restore the most recent baclup files
 
Back
Top