Sei sulla pagina 1di 5

Documentation on the new enhancements in Backup and Recovery techniques used in eSeva .

Existing Scenario in eSeva: Currently we are using the export/import in eSeva to take the backup of the database and to restore the database. By using this we are able to take the full backup of the database but not the incremental backups. The load on server during this backup is more, so that the process of the normal transactions gets slow and even the database hangs up and needs restart. The space occupied by this backup is more. Hence, the data loss is more in this technique. To overcome this we are implementing the advanced backup and recovery technique Rman: Enhanced Scenario in eSeva:
By implementing the Rman technique backup and recovery can be automated.

We can run incremental backups,so that the load on the database during the backup will be low.
The database can be restored faster compared to export/import tool.

We can run incremental backups multiple times a day,so that the data loss comes down compared to the Existing Technique. The space consumed by the backup will be less.

Overview of RMAN Backups


Backing up all or part of your database is accomplished by using the BACKUP command from within the RMAN client. RMAN uses the configured settings and channels for your database, the record of previous backups in the RMAN repository and the control file's record of the structure of your database to determine an efficient set of specific steps to perform in response to a BACKUP command, and then carries out those steps.

Files That RMAN Can Back Up


RMAN's BACKUP command supports backing up the following types of files: Database files, including datafiles, control files, and the server parameter file (SPFILE) Archived redo logs Other backups created by RMAN, including such as datafile and control file image copies, and backup sets containing SPFILEs, control files, datafiles and archived logs

About RMAN Backup Formats: Image Copies and Backup Sets


RMAN backups can be stored in one of two formats: as image copies or as backup sets.

About RMAN Full and Incremental Datafile Backups


RMAN backups of datafiles can be either full datafile backups, or incremental backups. A full backup of a datafile is a backup that includes every used data block in the file. If a full datafile backup is created as an image copy, the entire file contents are reproduced exactly. (If backing the datafile up to a backup set, then unused blocks may be skipped, as described in "About Backup Sets") An incremental backup of a datafile captures images of blocks in the datafile changed since a specific point in time, usually the time of a previous incremental backup. Incremental backups are always stored as backup sets. The resulting backup sets are generally smaller than full datafile backups, unless every block in the datafile is changed. RMAN can only create incremental backups of datafiles, not of archived redo log files or other files. During media recovery, RMAN uses the block images from incremental backups, to update changed blocks to their contents at the SCN where the block was created in a single step. Without incremental backups, all changes must be applied one at a time from the archived redo logs. Recovery using incremental backups is therefore much faster than applying changes one at a time from the archived redo logs. Incremental backups also capture changes to data blocks made by NOLOGGING operations, which are not recorded in the redo log. For these reasons, whenever incremental backups are available for use in media recovery, RMAN uses incremental backups instead of archived logs. RMAN KEY FEATURES RMAN, Recovery Manager, is a tool to backup, restoreand recover Oracle databases

Can store frequently executed commands as scripts,independent of OS Empty blocks are not copied Provides incremental backup feature to copy onlychanged blocks Can deduct block corruption while taking backup Parallelize operation to reduce backup time Can reduce reads per file, thus minimizing impact todatabase performance

STEPS TO BE FOLLOWED BEFORE CONNECTING Database should be in archive log mode Listeners should be started in both the target and catalogdatabase Recovery catalog database should be always up and running Target database should be in the mount phase (to read controlfiles) RMAN Backup Types Fullbackup of a data file that includes every allocated blockin the file being backed up Incrementallevel 0 Backup of every block except blockscompressed outLevel 1- includes blocks that have been changed sincethe parent backup was taken. OpenA backup of online, read/write datafiles when thedatabase is open. ClosedA backup of any part of the target database when it ismounted but not open. Closed backups can beconsistent or inconsistent. ConsistentBackup taken when the database is mounted (but not inopen),after proper shutdown.checkpoint SCNs in thedatafile headers match the header information in thecontrol file. InconsistentA backup of any part of the target database when it isopen or when a crash occurred or SHUTDOWN ABORTwas run prior to mounting.An inconsistent backuprequires recovery to become consistent. RMAN> BACKUP INCREMENTAL LEVEL 1 differential DATABASE;

Recovery Decide your scenario Lost controlfile Lost datafile Lost entire database Restore Restore database - Restores entire database including controlfile Restore datafile <filename> - Restores specific datafiles Restore tablespace <tablespace_name> - Restores all datafilesbelongs to tablespace. Restore controlfile - Restores only controlfile Restore archivelog all - Restores all archivelog files. RECOVER If restore completed successfully then following commandcan be executed based on the recovery scenario. Recover database - Recovering entire database Recover datafile <filename> - Recovering specificdatafiles recover tablespace <tablespace_name> - Recovering alldatafiles belongs to the tablespace recover database until cancel - Recovering database untilcanel recover database until time = <TIME> - Until time recover database until SCN = <SCN> - Until SpecificSCN recover database until SEQUENCE =<SEQ> - Until specificsequence

What is Backup and Recovery?


In general, backup and recovery refers to the various strategies and procedures involved in protecting your database against data loss and reconstructing the database after any kind of data loss.

1.1.1 Physical Backups and Logical Backups


A backup is a copy of data from your database that can be used to reconstruct that data. Backups can be divided into physical backups and logical backups.

Physical backups are backups of the physical files used in storing and recovering your database, such as datafiles, control files, and archived redo logs. Ultimately, every physical backup is a copy of files storing database information to some other location, whether on disk or some offline storage such as tape. Logical backups contain logical data (for example, tables or stored procedures) exported from a database with an Oracle export utility and stored in a binary file, for later re-importing into a database using the corresponding Oracle import utility.

Potrebbero piacerti anche