Sharing experience on RMAN backups ...

Slides:



Advertisements
Similar presentations
1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
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.
CERN - IT Department CH-1211 Genève 23 Switzerland t Backup & Recovery with RMAN LCG 3D Workshop, Bologna June 12 th, 2007 Jacek Wojcieszuk.
Database Backup and Recovery
RMAN Restore and Recovery
Backup and Recovery Part 1.
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.
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
Backup Infrastructure – Additional Information Gordon D. Brown, RAL Carlos Fernando Gamboa, BNL 3D Workshop, CNAF, Bologna, Italy 13 th June 2007.
Navigating the Oracle Backup Maze Robert Spurzem Senior Product Marketing Manager
Backup & Recovery 1.
Oracle Recovery Manager (RMAN) 10g : Reloaded
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.
SRUTHI NAGULAVANCHA CIS 764, FALL 2008 Department of Computing and Information Sciences (CIS) Kansas State University -1- Back up & Recovery Strategies.
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.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
RMAN: Your New Best Friend for Backup and Recovery Ruth Gramolini ORACLE DBA Vermont Department of Taxes.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
Module 6 Backup of SQL Server 2008 R2 Databases. Module Overview Backing up Databases and Transaction Logs Managing Database Backups Working with Backup.
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
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.
© 2006 Northgate Information Solutions plc and its associated companies. All rights reserved. Slide 1.
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.
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
RMAN Maintenance.
Introduction.
RMAN Maintenance.
Backup and Recovery.
RMAN Backups.
Recovery Catalog Creation and Maintenance
Backup and Recovery (1) Oracle 10g Hebah ElGibreen CAP364.
Performing Database Backups
Clonedb: The quick and easy cloning solution you never knew you had.
Configuring Recovery Manager
Duplicating a Database
Index Index.
Configuring Backup Settings
Database Backup and Recovery
Presentation transcript:

Sharing experience on RMAN backups ... Sydney Oracle Meetup #14 Yury Velikanov Member of Sydney’s Oracle Community

General Guidelines & Concepts Typical backup flow Nightly/Weekly/Monthly (depends on the DB size) {rARCHs + CTL} + {FULL DB BACKUP + ARCH + CTL} Each 4h/2h/1h/15min (depends on ARHC volumes) {rARCHs + CTL} To reduce backup’s volumes (size) Some Nightly/Weekly might be replaced by {INCLEMENTAL}

RMAN: Minimal set of commands Nightly/Weekly/Monthly backup archivelog delete input; backup database; backup current controlfile; restore controlfile; restore database; recover database; alter database open; backup database; backup database plus archivelog; backup database plus archivelog delete input; Each 4h/2h/1h/15min backup archivelog delete input; backup database; backup current controlfile;

Starting an RMAN session & more set NLS_DATE_FORMAT=YYYY/MM/DD HH24:MI:SS rman target / list backup; show all; -- could be used to restore cfg CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = 'C:\oracle\backup\df0_%d_%s_%t'; CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;

RMAN: Advanced set of commands BACKUP ${v_compress} ${v_files_per_set} ${v_max_set_size} ARCHIVELOG ALL NOT BACKED UP ${v_num_arch_bkps} TIMES FORMAT '${v_backup_archlog_format}' ${v_del_input}; BACKUP ${v_compress} ${v_files_per_set} ${v_max_set_size} ARCHIVELOG FROM SEQUENCE ${v_init_sequence_to_start_with} FORMAT '${v_backup_archlog_format}' ${v_del_input};" DELETE NOPROMPT ARCHIVELOG ALL BACKED UP $v_del_arch_copies TIMES TO DISK COMPLETED BEFORE 'TRUNC(SYSDATE-1/(${p_del_arch_oldr_h}*24))'; BACKUP ${v_incremental} ${v_compress} ${v_files_per_set} ${v_max_set_size} DATABASE FORMAT '${v_backup_database_format}'; BACKUP ${v_compress} CURRENT CONTROLFILE FORMAT '${v_backup_controlfile_format}'; BACKUP ${v_compress} SPFILE FORMAT '${v_backup_spfile_format}';"

Implementation Constraints Are we integrating backups with existing company wise solution? Or backup infrastructure dedicated to Oracle DB backups? File system or Tape backups Retention policy management (RMAN or MML) How many Oracle DBs in the organization? RMAN Repository Do we have Oracle RMAN integrated MML solution? File system or Tape backup Do we have Enterprise Edition or Standard Edition ...

RMAN Catalog DB consideration Use Control file only IMHO Good choice for most of the cases Why to manage an additional database? Default option starting from 9i?10G? Organizations where retention policy managed by MML Database count is low Why use Control file & DB Repository? Just to have a fun and keep us busy :) If your organization have many Oracle Databases If you use OEM databases and it treated as critical resource If you need to lock some of your backups If you write a backup script test connection to catalog DB There might be a strange synchronization issues

Backups Performance Optimization Empty block skipping (8i) Stores 1 block for 4 empty block Applicable to blocks above High Water Mark only Compressed backups (10g) Might improve performance 2-4 times if MML is slower then CPU Doesn’t improve performance if CPU are slower then MML Advanced Compression in 11g (additional licence) Parallel backups (8i) Improves performance significantly if enough IO resources Might be very powerful in conjunction with compression Might kill overall system performance as tend to use all resources available

Backups Performance Optimization Incremental backups (9i) Improve speed of backups if MML is a a performance bottleneck Block change tracking (10g) Increase a speed of incremental backups dramatically Introduce a slight overhead on regular operations Read Only tablespaces CONFIGURE BACKUP OPTIMIZATION ON; Standby database

Recovery Performance Optimization If you use tape backups: Use as small backup sets as reasonable Depending on MML implementation: one file restore from a backup set (e.g. control file) reads entire backup set Image copy updatable by incremental backups Automatic or Manual standby database Manual in case of Standard Edition

Real World Case 1 (Zipping bck sets) Constraints Company wide backup policy/procedures in use Each server has NFS mounted directory where backups are stored Each night centralized backup solution backups files in the directory and remove those straight after backup is completed (excluding *.tmp files only) “Wrong” Solution RMAN fromat => *.tmp files Zip scripts triggered after backup, compressing and removing .tmp log_archive_dest => NFS; backup script => backup and remove ARCHs “My” Solution :) RMAN makes backups in *.rman.tmp files As soon as backup completed "mv *.rman.tmp *.rman“ Uncatalog / Catalog backup sets

Real World Case 2 (Could we restore?) Description Accidentally found that Media Management Layer software metadata stored on the server where backup has been taken Metadata RMAN Handle map to MML handles It wouldn’t be possible to restore backups on the other server or if the original server lost complicity Solution & Take Away Test recovery on other server than backups were taken from Keep MML metadata & log files as part of you backups

Real World Case 3 (Extreme Restore) Description 3-d party financials application Application’s module used to manage Oracle structures & parameters An administrator decided to change PCTUSER parameter for one of the main transactions table He used (as instructed) the application’s module Instead of 1-2 seconds the operation took 10 -15 min The administrator interrupted the operation Application’s module cleaned up source and target structures It appears that last valid backup was taken 6 months ago Solution & Take Away Oracle Logminer used to restore the table Use your imagination and be creative

Archivelogs backup management For strange reasons some DBAs tend to leave ARCHs for some time on a DB server file system (after backup) In some organizations ARCHs’ backup are separated from data files backups Data files by RMAN ARCHs backed up and removed by OS scripts IMHO: Relative ARCHs should be part of data files backups and stored using the same policy ARCHs regular backups should be suspended before Data Files backup starts Some one might say that ARCHs should be stored in more secure place than data file backups. You may chouse to store those twice :)

Practical advice Don’t change backup set location if possible Often ZIP backup sets RMAN Log files should be part of backup Record Begin/End SCN’s and the log file Record Timing information Spool DB and MML version information May spool file current file structure spool “show all;” command output in the beginning Specify data/arch/ctl/sp as part of backup set name

Open Discussion ... Media Management Layer integration Retention policy management Flash recovery area …

Thank you