i'm trying to create backup restore script .
in short my backup script creating new directory every day from the operating system level and then backup the database using the directory created
i tried the below script but it seems RMAN doesn't recognize the controlfiles
here is my script
**#RMAN RESTORE SCRIPT**
#!/bin/bash
#Environment Variables
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1
ORACLE_SID=cdb11
PATH=$PATH:$ORACLE_HOME/bin
DD=
date +%Y-%m-%d-%H-%M
export ORACLE_HOME ORACLE_SID PATH DD controlfile backupsets
controlfile=/ArchiveDBBackup/DAILY_RMAN/${DD}/CDB1_CONTROLFILE
backupsets=/ArchiveDBBackup/DAILY_RMAN/${DD}/
export controlfile backupsets
LOGFILE=/RMAN/log/DAILY_FULLBKP_RESTORE_date +%Y%m%d
.log
rman target / LOG $LOGFILE RMAN-03002: failure of restore command at 07/04/2021 09:35:57
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
any idea how can RMAN recognize linux variables ? or anyway to achieve the restore with those variables ?
Asked by Seif Hassan
(11 rep)
Jul 4, 2021, 08:51 AM
Last activity: Jul 29, 2025, 02:02 AM
Last activity: Jul 29, 2025, 02:02 AM