Download presentation
Presentation is loading. Please wait.
Published byGeraldine Chase Modified over 9 years ago
1
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session
2
Additional RMAN Features Operations With RMAN, DBAs can: Use encryption to secure backup sets Utilize unused block compression to minimize backup size and time Configure dynamic channel allocation for (Real Application Cluster) RAC environments With the Enterprise Manager Grid Control, manage backup jobs across all databases Use specified incremental backup to roll forward standby database
3
Unused Block Compression Oracle 10g, unlike previous Oracle releases, utilizes unused block compression. This means that it only backs up used blocks belonging to locally managed tablespaces. Unused blocks are not backed up, saving considerably on time and space.
4
Real Application Clusters ( RAC ) With Real Application Clusters ( RAC ), multiple low-cost computers can work together as a single large computer for database processing. When processing demands and the number of users increase, it is simple to add more RAC nodes. You can use RMAN to backup an RAC configuration by configuring specific nodes or using a single node.
5
Incremental Backups and Physical Standby Databases Incremental backups default to backing up blocks that were not backed up in previous backup operations RMAN's "incremental backup from SCN " option allows one to start from specified SCN
6
Repository vs. Controlfile Repository Track Multitude of Databases Maintain Backup / Recovery Scripts Controlfile No Repository needed
7
Encrypting Backup Sets Use CONFIGURE ENCRYPTION command: CONFIGURE ENCRYPTION FOR [DATABASE | TABLESPACE …] Users specify the encryption algorithm to use for the backup: Oracle Wallet (default) User-specified password Use RMAN and Oracle Secure Backup for encrypted backups to tape
8
Parameters that Affect RMAN CONTROL_FILE_RECORD_KEEP_TIME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE NLS_DATE_FORMAT NLS_LANG
9
Setting NLS_LANG and NLS_DATE_FORMAT Environment variables set at the operating system level: Windows: REGEDIT UNIX NLS_LANG=American_America.AR8MSWIN1256 export NLS_LANG
10
Initialization Parameters CONTROL_FILE_RECORD_KEEP_TIME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE
11
Change RMAN Default Settings with CONFIGURE RMAN uses default settings for CONFIGURE options. You can revert to the default for any CONFIGURE command by running the same command with the CLEAR option: RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
12
Uses for CONFIGURE Change retention policy Define the settings for automatic channels for a specified device type Set the device type Define the default format for the control file autobackup output files Toggle control file autobackup feature
13
Using the SHOW Command Display current value(s) for any or all of RMAN's configured settings See which values are currently set to their defaults Connect to the target database and recovery catalog (if used). Execute SHOW command with appropriate setting: RMAN> SHOW RETENTION POLICY;
14
Using the SHOW ALL Command Displays all settings that may be changed with CONFIGURE The output is displayed as the series of RMAN commands that is necessary to re-create the configuration. You can save the output of SHOW ALL into a text file and use that command file to re-create the configuration on the same or a different database. Output lines containing a pound sign ( # ) indicate default values.
15
Setting a Retention Policy A retention policy determines how long database backups are retained, as well as how far back you can recover your database. For many legal and other reasons, setting a retention policy is vital to a company. You can set retention policy in the form of either a recovery window (how far into the past you must be able to recover your database) or a redundancy value (how many backups of each file you need to retain).
16
Retention Policy Commands Ensure that RMAN retains sufficient backups to be able to recover to any point in time in the past eight days: RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 8 DAYS; Ensure that RMAN retains the last four backups of each data file RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 4;
17
The DELETE OBSOLETE Command and the KEEP Option DELETE OBSOLETE removes backups deemed obsolete by retention policy Database automatically deletes obsolete backups in the flash recovery area when space is needed. KEEP option of the BACKUP and CHANGE commands overrides the configured retention policy for individual backups
18
Configuring RMAN to Write Disk Backups RMAN channels are responsible for executing all RMAN tasks. By default, RMAN specifies one disk channel for all operations. The following command configures RMAN to write disk backups to the /backup directory. CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/ora_df%t_s%s_s%p'; The format specifier %t is replaced with a four- byte time stamp, %s with the backup set number, and %p with the backup piece number.
19
Configuring an Automatic Storage Disk Group Specify ASM group as argument: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+dgroup1'; Implications: Backups directed away from flash recovery area Loss of disk space management capabilities
20
Special Configuration for Media Managers Use PARMS string in the CONFIGURE command: CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='ENV=mml_env_settings'; Use CONFIGURE DEVICE TYPE SBT to configure parallelism settings for SBT device
21
Automatically Back Up the Control and Server Parameter Files Enable autobackup: CONFIGURE CONTROLFILE AUTOBACKUP ON; Disable autobackup: CONFIGURE CONTROLFILE AUTOBACKUP OFF;
22
Change the Default Autobackup Format You can change the default format by running the following command: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'string'; deviceSpecifier is any valid device 'string' is a valid handle for the specified device The only substitution variable permitted in ' string' is %F.
23
Clear the Default Autobackup Format You can clear control file autobackup formats for a device by running the following commands: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt CLEAR;
24
Specifying the SET CONTROLFILE AUTOBACKUP FORMAT Command Order of precedence of controlfile autobackup formats: SET CONTROLFILE AUTOBACKUP FORMAT (within a RUN block) SET CONTROLFILE AUTOBACKUP FORMAT (at RMAN prompt) CONFIGURE CONTROLFILE AUTOBACKUP FORMAT
25
Configure Backup Sets or Image Copies Establish default file type for backup: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY; # image copies RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET; # uncompressed backup sets The default for backups to disk is backup set.
26
Write Control File Autobackups to the /backupdir Directory Control file autobackups are stored in flash recovery area by default Write control file autobackups to the /backupdir directory: RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backupdir/cf%F';
27
Configure RMAN to Make Backups to Other Devices RMAN backs up to disk by default Set up SBT (tape / media manager) device, then direct RMAN to use it: CONFIGURE DEFAULT DEVICE TYPE TO sbt;
28
Configuring RMAN to Use Compressed Backupsets Instruct RMAN to use compressed backup sets by default: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET ; Use same command without COMPRESSED option to disable compression: RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;
29
Manage RMAN’s Persistent Settings Use CONFIGURE command to specify: Disk and SBT channel behavior Backup destinations Policies affecting backup strategy Changes survive shutdown and restart of RMAN
30
RMAN Disk Channel Behavior One disk channel is "default" channel for all operations Information stored in flash recovery area if no other location specified Use FORMAT clause with CONFIGURE CHANNEL DEVICE TYPE DISK to specify alternative default location for disk backups
31
Configuring RMAN to Write Disk Backups to a Temporary Directory Write disk backups to the directory /tmp : RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/tmp/%U'; Use CLEAR option to undo specific configuration: RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT CLEAR;
32
Make the Media Manager the Default Backup Destination Configure media management software, then direct RMAN backups to media manager: RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt; Use PARMS string, if necessary, to pass parameters to media manager: RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='ENV=mml_env_settings'; Use multiple channels for parallel backups
33
Start RMAN Utility and Allocate Channels Start RMAN with a connection to the target database, the auxiliary instance, and, if applicable, the recovery catalog database: % rman TARGET SYS/oracle@trgt CATALOG rman/cat@catdb AUXILIARY SYS/oracle@aux
34
Manually Allocate Auxiliary Channels Manually allocate at least one auxiliary channel if you have not configured automatic channels The channel type ( DISK or sbt ) must match the media. More channels means faster duplication if the backups are on disk. Limit the number of channels to the number of devices available for tape backups.
35
Manually Allocate Auxiliary Channels – Example Manual allocation of an SBT channel and three auxiliary channels: RUN { ALLOCATE AUXILIARY CHANNEL ch1 DEVICE TYPE sbt; ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK; ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK; ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;. DUPLICATE TARGET DATABASE TO dupdb; }
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.