Backup Infrastructure – Additional Information Gordon D. Brown, RAL Carlos Fernando Gamboa, BNL 3D Workshop, CNAF, Bologna, Italy 13 th June 2007.

Slides:



Advertisements
Similar presentations
LA Oracle Users Group Succeeding with RMAN Tim Gorman Principal SageLogix, Inc.
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
Shell Canada Limited Session: Compelling Reasons to Use Oracle9i R2 RMAN Wayne Linton Oracle Database Administrator Shell Canada Limited Session.
Introduction to Oracle Administration Glen Parker University of South Florida BbWorld 07 Boston, MA.
CERN - IT Department CH-1211 Genève 23 Switzerland t Backup & Recovery with RMAN LCG 3D Workshop, Bologna June 12 th, 2007 Jacek Wojcieszuk.
1 Chapter 17 Troubleshooting RMAN. 2 Background Authors thought this topic was often glazed over or not covered well Knew that every topic can’t be covered,
DBA 101 Bootcamp New DBA Series Backup 101 April 12, 20111Paper #352.
1 Getting The Most Out of RMAN By: Charles Pfeiffer CIO, Remote Control DBA (888)
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Database Backup and Recovery
INTRODUCTION TO ORACLE Lynnwood Brown President System Managers LLC Data Loading & Backup And Recovery Lecture 5 Copyright System Managers LLC 2003 all.
RMAN Restore and Recovery
CERN IT Department CH-1211 Genève 23 Switzerland t Backup configuration best practices Jacek Wojcieszuk, CERN IT-DM Distributed Database.
Oracle’s Backup and Recovery Tool
Configuring Recovery Manager
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
Chapter 5 Configuring the RMAN Environment. Objectives Show command to see existing settings Configure command to change settings Backing up the controlfile.
Backup & Recovery with RMAN
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
1 Recovery and Backup RMAN TIER 1 Experience, status and questions. Meeting at CNAF June of 2007, Bologna, Italy Carlos Fernando Gamboa, BNL Gordon.
CHAPTER 17 Configuring RMAN. Introduction to RMAN RMAN was introduced in Oracle 8.0. RMAN is Oracle’s tool for backup and recovery. RMAN is much more.
1 © 2006 Julian Dyke Logical Standby Julian Dyke Independent Consultant juliandyke.com Web Version.
The Oracle Recovery Manager (RMAN)
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
CHAPTER 18 RMAN Backups and Reporting. Introduction to RMAN Backups and Reporting The focus of this chapter is backups of: Datafiles Control files Archived.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Oracle backup and recovery strategy
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
1 RAL Status and Plans Carmine Cioffi Database Administrator and Developer 3D Workshop, CERN, November 2009.
University of Wisconsin Hospital & Clinics Database / environment refresh steps.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
Lots of Stuff Gordon D. Brown Science & Technology Facilities Council WLCG Service Reliability Workshop CERN November 2007.
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
Backup and Recovery Protects From Data Loss. Backup and Recovery Protects From Data Loss Provides for Media Recovery.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
Chapter 9 Scripting RMAN. Background Authors felt that scripting was a topic not covered well Authors wanted to cover both Unix/Linux and Windows environments.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
A Guide to Oracle9i1 Database Instance startup and shutdown.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
10 Copyright © 2007, Oracle. All rights reserved. Using RMAN Enhancements.
RMAN: Beginner to Advanced in 1 Hour
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle Recovery Manager Overview and Configuration
RMAN Maintenance.
Sharing experience on RMAN backups ...
RMAN Maintenance.
Recovery Catalog Creation and Maintenance
Configuring Recovery Manager
Oracle ASM on Azure: Backup Scenarios
Duplicating a Database
Using the RMAN Recovery Catalog
Configuring Backup Settings
RAC Backup and Recovery Lab
Performing Database Recovery
Presentation transcript:

Backup Infrastructure – Additional Information Gordon D. Brown, RAL Carlos Fernando Gamboa, BNL 3D Workshop, CNAF, Bologna, Italy 13 th June 2007

Overview Central RMAN Catalogue Scripts notification Restore validate Catalogue resync Mend: mail in script New SQL

RMAN Catalog Backup details stored centrally Common scripts One connection from all machines Version has to be newest Setup at RAL: –Dedicated server –Cold backups

Scripts Jobs in crontab on each database: # RMAN Schedules follow here 30 1 * * 1 /home/oracle/rmanfulback.sh mars rman rcat >/dev/null 2>& * * 2-7 /home/oracle/rmanincback.sh mars rman rcat >/dev/null 2>& * * * /home/oracle/rmanvalidate.sh mars rman rcat >/dev/null 2>&1

Full Backup Script 1 #!/bin/ksh # #################################################################### # # THE INPUT PARAMETERS ARE : # # $1 - Target DB # $2 - RMAN owner # $3 - RMAN password # $4 - RMAN DB # # Script to backup archived redo log files # #################################################################### # # Check arguments # if [[ $# -ne 4 ]] then echo "$0 Error on $HOST: \nUsage: $0 TARGET_DB RMAN_OWNER RMAN_PWD RMAN_DB" exit 1 fi

Full Backup Script 2 ################### # RMAN variables # ################### # export SID=$1 export RMAN_OWNER=$2 export RMAN_PWD=$3 export RMAN_DB=$4 export LOGIN_PATH=$PATH export LOGIN_LD_LIBRARY_PATH=$LD_LIBRARY_PATH. /home/oracle/ora10$SID.sh export HBlog=/home/oracle/$SID/rmanlogs/fulback${SID}.`date +%d%m%y%H%M%S`.log echo $HBlog export sub=$HOSTNAME.$ORACLE_SID..Backup.Failure

Full Backup Script 3 rman target / catalog log \"${HBlog}\" << SQL show all; run { backup incremental level 0 database plus archivelog delete input; } report obsolete; delete noprompt obsolete; list backup; Exit SQL oraerror=`cat $HBlog | grep "ORA-"` rmanerror=`cat $HBlog | grep "RMAN-"` echo $oraerror echo $rmanerror if [ -z "$oraerror" -a -z "$rmanerror" ] then echo "No Errors" else echo "Errors Found !!!!" cat $HBlog |mailx -s $ sub fi

Level 1 Backup show all; run { backup incremental level 1 database plus archivelog delete input; } report obsolete; delete noprompt obsolete; list backup; exit

Archive Logs Backup show all; run { backup archivelog all delete input; } report obsolete; delete noprompt obsolete; list backup; exit

RMAN Sync Run through OEM show all; run { resync catalog; } list backup; exit

Restore Validate show all; run { restore validate database archivelog all; } list backup; exit

Job through OEM

Backup 1

Backup 2

Script #################################################################### # # This script Produces Backup Reports to be sent to the DBAs # # Amendments : # AJW - 15/05/2007 initial construction # #################################################################### # set the rcat environment. /home/oracle/ora10rcat.sh sqlplus / as sysdba exit !! export sub=Backup.Report.`date +%d%m%y%H%M%S` echo $ sub cat /home/oracle/rmanrep1.txt |mailx -s $ sub

SQL spool /home/oracle/rmanrep1.txt; set line 120 set pagesize 999 /* get list of latest database backup times */ select a.db_name "Database", db.dbid "DBID", a.end_time "Latest Backup", a.output_bytes "Bytes Processed", (end_time - start_time) * 60 * 60 * 24 "Seconds Taken" from rman.rc_rman_status a, rman.rc_database db where object_type in ('DB FULL','DB INCR') and status = 'COMPLETED' and operation = 'BACKUP' and end_time = (select max(end_time) from rman.rc_rman_status b where b.db_name = a.db_name and b.db_key = a.db_key and object_type in ('DB FULL','DB INCR') and status = 'COMPLETED' and operation = 'BACKUP') and db.db_key = a.db_key order by end_time ;

Backup for Catalog (twice a day) ${ORACLE_HOME}/bin/rman target / nocatalog log \"${HBlog}\" << SQL show all; shutdown immediate startup mount; backup database; startup; report obsolete; delete noprompt obsolete; list backup; exit SQL

RMAN Config RMAN> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 2; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/opt/oracle/backup/mars/%F.bak'; CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1; CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 100 M FORMAT '/opt/oracle/backup/mars/mars_%U.bak'; CONFIGURE MAXSETSIZE TO UNLIMITED; CONFIGURE ENCRYPTION FOR DATABASE OFF; CONFIGURE ENCRYPTION ALGORITHM 'AES128'; CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/app/oracle/product/10.2.0/dbs/snapcf_mars1.f'; RMAN>

Summary We run backup jobs through crontab Resync and job through OEM Archive Logs backup job could be run automatically as oem job when area 70% full (for example) Keep it simple, keep it documented

Questions & (hopefully) Answers