HP/UX fixes

This commit is contained in:
2025-10-28 11:02:06 -04:00
parent 67050cf3a0
commit 6c1f8c926e
6 changed files with 210 additions and 82 deletions

View File

@@ -7,17 +7,9 @@
# usage: rman_logs.ksh <ORACLE_SID>
get_script_dir() {
# Portable way to get script directory for Linux and HP/UX (ksh compatible)
src="$0"
while [ -h "$src" ]; do
dir=$(cd -P $(dirname "$src") >/dev/null 2>&1 && pwd)
src=$(readlink "$src")
case $src in
/*) ;; # absolute path
*) src="$dir/$src";;
esac
done
cd -P $(dirname "$src") >/dev/null 2>&1 && pwd
dir=$(cd -P "$(dirname "$src")" >/dev/null 2>&1 && pwd)
echo "$dir"
}
MYDIR=$(get_script_dir)
export ORACLE_SID=$1
@@ -31,11 +23,9 @@ export ORACLE_SID=$1
export ORAENV_ASK=YES
. $MYDIR/rbk_api.conf
. $MYDIR/rubrik.conf
. $MYDIR/oracle_funcs.ksh
#ORACLE_SID=$1
usage() {
echo "Usage: $0 <DBNAME>]" 1>&2
exit 1
@@ -45,9 +35,6 @@ if [ -z "${ORACLE_SID}" ]; then
usage
fi
#ORAENV_ASK=NO
#. oraenv
export NLS_DATE_FORMAT='mm-dd-yyyy hh24:mi:ss'
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
@@ -94,6 +81,7 @@ set echo on;
show all;
crosscheck backup;
run {
CONFIGURE BACKUP OPTIMIZATION OFF;
set controlfile autobackup format for device type disk to '$channel0/cf_%F';
$allocate
backup archivelog all not backed up 1 times tag 'rubrik_pit_logs';