more little fixes

This commit is contained in:
2025-10-28 12:21:11 -04:00
parent 6c1f8c926e
commit 09fd3b2c67
5 changed files with 76 additions and 14 deletions

View File

@@ -62,15 +62,31 @@ fi
echo Running RMAN with log to $RMAN_LOG
allocate=""
release=""
i=0
while [ $i -lt $numChannels ]; do
allocate="$allocate allocate channel 'c$i' device type disk format '$MOUNTPOINT/c$i/%U';"
release="$release release channel c$i;"
i=$(expr $i + 1)
done
channel0="$MOUNTPOINT/c0"
# Default RMAN channels per mount if not set
RMAN_CHANNELS_PER_MOUNT=${RMAN_CHANNELS_PER_MOUNT:-1}
total_channels=$(expr $numChannels \* $RMAN_CHANNELS_PER_MOUNT)
if [ $total_channels -eq 1 ]; then
allocate="allocate channel 'ch1' device type disk format '$MOUNTPOINT/%U';"
release="release channel ch1;"
channel0="$MOUNTPOINT"
else
allocate=""
release=""
i=0
while [ $i -lt $numChannels ]; do
j=0
while [ $j -lt $RMAN_CHANNELS_PER_MOUNT ]; do
suffix=$(echo $j | tr '0123456789' 'abcdefghijklmnopqrstuvwxyz')
allocate="$allocate allocate channel 'c${i}${suffix}' device type disk format '$MOUNTPOINT/c$i/%U';"
release="$release release channel c${i}${suffix};"
j=$(expr $j + 1)
done
i=$(expr $i + 1)
done
channel0="$MOUNTPOINT/c0"
fi
# RMAN Part Here