dsmc usage

tenpin

ADSM.ORG Member
Joined
Dec 21, 2004
Messages
120
Reaction score
1
Points
0
Location
Midwest
Website
nocoast-tech.blogspot.com
I created a script on a RHEL box to restore some directories after cleaning them out, it also does some post processing and is called from a wrapper script so the App team can do their own weekly support builds. During the restore (client v5.5.1.0, server v5.5.1.1) I get a prompt to select an action for a write protected file, whats perplexing is that the file would not exist before the restore starts (I am rm -rf 'ing the dir.) and I am specifying -replace=all on the cli.

Here is a bit of the script:

#!/bin/bash
# FIN iStore App Tier Restore
# Source: pruase25
# Target: pruase28

# Check if running as root
if [[ $UID != "0" ]];then
echo "Please rerun this script as root, exiting"
exit 1
fi

# Variables
source="othernode"
server="tsm_server"
dsmc="dsmc restore"
opts="-asnode=$source -se=$server -preserv=nobase -subdir=y -replace=all"
echoblock="echo -e \n\n#########################################################\n\n"

# Clean up directories first
echo "removing directories"
rm -rf /ebssup1/app/applmgr/ebssup1appl/ /ebssup1/app/applmgr/ebssup1ora/ /ebssup1/app/applmgr/ebssup1comn/
$echoblock

# ebsprd1appl -> ebssup1appl
echo "restoring /ebsprd1/app/applmgr/ebsprd1appl/* to /ebssup1/app/applmgr/ebssup1appl/"
$dsmc /ebsprd1/app/applmgr/ebsprd1appl/* /ebssup1/app/applmgr/ebssup1appl/ $opts
$echoblock




During the restore I am seeing errors like this, but the file seems to be diff. each time.
--- User Action is Required ---
File '/ebssup1/app/applmgr/ebssup1appl/bis/11.5.0/admin/import/US/biseul.eex' is write protected

Select an appropriate action
1. Force an overwrite for this object
2. Force an overwrite on all objects that are write protected
3. Skip this object
4. Skip all objects that are write protected
A. Abort this operation



The permissions on the file seem fine - shouldn't be a problem overwriting it:
-rwxr-x--- 1 applsup1 dbasup1 27502711 Oct 24 2002 /ebssup1/app/applmgr/ebssup1appl/bis/11.5.0/admin/import/US/biseul.eex

Am I missing something obvious? the manual seems more confusing then helpful:
http://publib.boulder.ibm.com/infoc...c/com.ibm.itsmfdt.doc/ans50000356.htm#opt6073
 
Hey there! I never knew about the -r flag for the rm command. That's mighty useful.

Try it with a 'sleep 60' in between the 'rm -rf' and the 'dsmc restore'. Maybe the file deletions are taking a few seconds to complete, and some of the files still exist when the restore starts.

Good luck!

I just manually did the 'rm', and am running my script again to see what difference (if any) it will make. I still don't understand why I am getting prompted for the restore since I specify -replace=all.
 
Back
Top