Backup and Recovery Protects From Data Loss
Backup and Recovery Protects From Data Loss Provides for Media Recovery
Backup and Recovery Protects From Data Loss Provides for Media Recovery Backup Types Physical Logical
Backup and Recovery Protects From Data Loss Provides for Media Recovery Backup Types Physical Logical Types of Backups Recovery Manager (RMAN) User-Managed (including third party utility)
Backup Strategy Comprehensive RMAN Database files, including datafiles, control files, and the server parameter file ( SPFILE ) Archived redo logs OS Network configuration files ( listener.ora, tnsnames.ora, et cetera) Password files External tables Oracle home
RMAN BACKUP Command Basic BACKUP Commands: BACKUP DATABASE BACKUP CURRENT CONTROLFILE BACKUP SPFILE BACKUP ARCHIVELOG ALL
RMAN Default Configuration Backup Location OS Dependent Backup Type Disk Backup Channels One MAXSETSIZE Unlimited
Backup Example $ rman Recovery Manager: Release Production on Thu Jun 15 10:28: Copyright (c) 1982, 2005, Oracle. All rights reserved. RMAN> connect target target database Password: connected to target database: MYLREP (DBID= ) RMAN> backup database; Starting backup at 12-JUN-08.Output from backup is printed here. Finished backup at 12-JUN-08 RMAN> exit
BACKUPSET vs. COPIES BACKUP SET Consists of BACKUP PIECES Proprietary Format Backup "USED" blocks Only RMAN can be used to restore/recover
BACKUPSET vs. COPIES BACKUP SET Consists of BACKUP PIECES Proprietary Format Backup "USED" blocks Only RMAN can be used to restore/recover COPIES Identical to OS copies. Can be used as replacement to datafile. Can be used in user-controlled recover/restores.
Block Change Tracking Used for Incremental Backups Traditional incremental backup read entire datafile. Enabled Block Change Tracking Creates Change Tracking File ( CTF ) Use CTF to determine blocks to backup Consider Environment
Enabling and Disabling Change Tracking Current State: SQL> SELECT * FROM V$BLOCK_CHANGE_TRACKING; Enabling/Disabling: SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING; SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/oracle/bu/rman_change_track.f' REUSE; SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
RMAN> list backup; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time Full 1.80G DISK 00:02:49 12-JUN-08 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG T Piece Name: /opt/oracle/product/10g/dbs/01jio142_1_1 List of Datafiles in backup set 1 File LV Type Ckp SCN Ckp Time Name Full JUN-08 /oracle/mylrep/sxfbf35/ora/system01.dbf 11 Full JUN-08 /oracle/mylrep/sxfbf35/ora/mgmt_ecm_depot1.dbf BS Key Type LV Size Device Type Elapsed Time Completion Time Full 6.92M DISK 00:00:01 12-JUN-08 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG T Piece Name: /opt/oracle/product/10g/dbs/02jio19j_1_1 Control File Included: Ckp SCN: Ckp time: 12-JUN-08 SPFILE Included: Modification time: 11-JUN-08
LIST COMMANDS LIST BACKUP; LIST BACKUPSET; LIST COPY; LIST EXPIRED BACKUP;
CROSSCHECK and DELETE RMAN> CROSSCHECK BACKUP; RMAN> DELETE EXPIRED BACKUP;
REPORT REPORT NEED BACKUP; REPORT OBSOLETE; REPORT SCHEMA; REPORT UNRECOVERABLE;