RMAN Nohup
[oracle@rac2 ~]$ cd /u02/oracle/backup/DBAUNI_DG/
[oracle@rac2 DBAUNI_DG]$ ls -ltr
total 1614280
initDBAUNI_after.ora
restore_db.sh
initDBAUNI_DG.ora.bkp
initDBAUNI_DG.ora
duplicate_DBAUNI_DG.sh
database_DBAUNI_17tmj2i0_39
database_DBAUNI_18tmj2i0_40
database_DBAUNI_19tmj2i0_41
Control_DBAUNI_1gtmj2jk_48
arch_DBAUNI_1btmj2j9_43
arch_DBAUNI_1ctmj2ja_44
arch_DBAUNI_1dtmj2ja_45
arch_DBAUNI_1etmj2jh_46
[oracle@rac2 DBAUNI_DG]$
[oracle@rac2 DBAUNI_DG]$ cat duplicate_DBAUNI_DG.sh
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1
BACKUP_LOG_PATH=/u02/oracle/backup/DBAUNI_DG
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID=DBAUNI_DG
export BACKUP_LOG_PATH
LOG_FILE=${BACKUP_LOG_PATH}/duplicate_DBAUNI_DG_NEW.log
/u01/app/oracle/product/12.2.0.1/bin/rman msglog=${LOG_FILE} << EOF
connect auxiliary /
run {
allocate auxiliary channel t1 type disk;
allocate auxiliary channel t2 type disk;
allocate auxiliary channel t3 type disk;
SET NEWNAME FOR DATABASE TO '/u02/oracle/oradata/DBAUNI_DG/%b';
duplicate target database for standby backup location '/u02/oracle/backup/DBAUNI_DG' nofilenamecheck;
}
exit
EOF
[oracle@rac2 DBAUNI_DG]$
[oracle@rac2 DBAUNI_DG]$ chmod 775 duplicate_DBAUNI_DG.sh
[oracle@rac2 DBAUNI_DG]$ nohup ./duplicate_DBAUNI_DG.sh &
============
catalog backuppiece '/u02/oracle/backup/STANDBY_DG/database_UC_GdsTvd';
RECOVER DATABASE FROM TAG STANDBY_TODAY_REFRESH NOREDO;
alter database recover managed standby database disconnect from session;
Comments
Post a Comment