Respaldo RMAN
Respaldo RMAN
Respaldo RMAN
*************************************************************
cat /home/oracle/CZM/SCRIPTS/rman_backup_full_daily_disk_montly_tape_nodo.sh
#################################################################
# Script: rman_backup_full_disk_nodo.sh
# Description: Executes daily, monthly, yearly rman backup full for NODO database
# Comments: Executes one time only
# Execution: Task on Crontab
# Parameters: Database's name
# Version: 1.0
# Author: DBA Oracle: ISC. Martin Gomez Jaime
# DBA Oracle: ECA. Gerardo Santana Soto
# Last Update: 15 Diciembre 2017
#################################################################
#!/usr/bin/ksh
# Debuguear
set -x
# Variables
DAY_MONTH=$(date | awk '{ print $3 }';)
echo $DAY_MONTH
SCRIPT1=/home/oracle/CZM/SCRIPTS
SCRIPT2=/home/oracle/TAREAS/scripts/MENSUALES/nodo
# Ejecucion de Respaldos
if [ $DAY_MONTH -gt 1 ]
then
echo Ejecutar el Respaldo Diario
$SCRIPT1/rman_backup_full_disk_Daily_nodo.sh
elif [ $DAY_MONTH -eq 1 ]
then
echo Ejecutar Respaldo Mensual
$SCRIPT2/rman_backup_full_tape_Month_nodo.sh
else
echo Fallo Ejecucion del Respaldo
fi
DAYWEEK=Fri
DAY_MONTH=1
MONTHYEAR=Dec
MONTHYEAR=Jan
#**********************************************************************************
*
# RMAN Full Backups
#**********************************************************************************
*
00 23 * * *
/home/oracle/CZM/SCRIPTS/rman_backup_full_daily_disk_montly_tape_nodo.sh
cat /home/oracle/CZM/SCRIPTS/rman_backup_full_disk_Daily_nodo.sh
cat /home/oracle/CZM/SCRIPTS/rman_backup_full_disk_Daily_nodo.sh
#!/bin/ksh
set -x
/home/oracle/CZM/SCRIPTS/respalda_nodo_160_mail.sh
mail -s "LOG RESPALDO NODO" operadorcierres@abccapital.com.mx -c
mgomezj@abccapital.com.mx -c czamarripa@abccapital.com.mx -c
gsantana@abccapital.com.mx -c Infraestructura_TI@abccapital.com.mx -c<
/home/oracle/CZM/LOGS/DISK/NODO/backup_NODO.log
cat /home/oracle/CZM/SCRIPTS/respalda_nodo_160_mail.sh
abcabankspri /home/oracle/CZM/SCRIPTS>cat
/home/oracle/CZM/SCRIPTS/respalda_nodo_160_mail.sh
#!/bin/ksh
export DATE=`date '+%y%m%d%H%M'`
export ORACLE_SID=nodo1
export ORACLE_HOME=/u01/app/product/11.2.0/db_1
export PATH=$PATH1:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
cat /home/oracle/CZM/SCRIPTS/BACKUP_NODO_DISK.rcv
run {
allocate CHANNEL ch1 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch2 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch3 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch4 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch5 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch6 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch7 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch8 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch9 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
allocate CHANNEL ch10 DEVICE TYPE DISK FORMAT '/backupabanks/BKP_NODO/RESP_NODO_%d_
%s_%T';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
crosscheck archivelog all;
backup database plus archivelog delete input;
#backup database plus archivelog;
SQL 'alter system archive log current';
# crosscheck backup;
# crosscheck archivelog all;
#backup archivelog all;
#delete input;
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
release channel ch5;
release channel ch6;
release channel ch7;
release channel ch8;
release channel ch9;
release channel ch10;
}
EXIT;
--Configuracion RMAN
abcabankspri /home/oracle/CZM/SCRIPTS>rman target /
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.