1 / 31

Backup and Recovery (1)

Backup and Recovery (1). Oracle 11g. Outline. Introduction Backup and Recovery, Why? Principle of Backup and Recovery Backup Backup Solutions: Overview Backup Methods Backup Strategies (Choosing the right backup ) Configuring for Recoverability Enterprise Manager:

Download Presentation

Backup and Recovery (1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Backup and Recovery (1) Oracle 11g Hebah ElGibreen

  2. Outline • Introduction • Backup and Recovery, Why? • Principle of Backup and Recovery • Backup • Backup Solutions: Overview • Backup Methods • Backup Strategies (Choosing the right backup) • Configuring for Recoverability • Enterprise Manager: • Configuring Backup • Schedule Backup • Managing Backup • Viewing Backup Job • Recovery (Next Lecture…) Hebah ElGibreen

  3. Introduction • 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. Hebah ElGibreen

  4. Backup and Recovery, Why? • The database administrators goal is to ensure that the database is open and available when users need it. • Failures can generally be divided into the following categories: • Statement failure • User process failure • Network failure • Instance failure • User error • Media failure Hebah ElGibreen

  5. Principle of Backup and Recovery • Reconstructing the contents of all or part of a database typically involves two phases: • Retrieving a copy of the data file from a backup. • Reapplying changes to the file, to bring the database to a desired SCN since the last backup. • ARCHIVELOG mode • ARCHIVELOG mode is on • NOARCHIVELOG mode is off Hebah ElGibreen

  6. Scenario of Backup and Recovery Hebah ElGibreen

  7. Backup Solutions: Overview • Backups can be performed by using: • Recovery Manager • Oracle Secure Backup • A user-managed Backup Hebah ElGibreen

  8. Backup Methods • Logical Backup (User level) • Export Backup • Import Backup • Physical Backup (DBA centric) • Offline Backup (cold or consistent backup) • Online Backup (hot or inconsistent backup) Hebah ElGibreen

  9. Backup Strategies …Choosing the right backup • Tape vs. Disk Backups • Physical vs. Logical Backups • Whole vs. Partial Backups • Consistent vs. Inconsistent Backups • Hot vs. Cold Backups • Full vs. Incremental Backups • Image Copies vs. Backupsets Hebah ElGibreen

  10. Backup Strategies …Choosing the right backup • Tape vs. Disk Backups • A common practice is to make backup copies on disk when possible and have them copied to tape in a separate operation. • Physical vs. Logical Backups • A logical backup can be much smaller than physical backup. • Logical backups cannot be used to restore the database; they can only be used to re-create the data. • If the database is restored from physical backups, then the redo logs can be used to recover all modifications to the data made since the physical backup was initiated. • If a logical backup is used to re-create data, any modifications to the data made after the logical backup was initiated are lost (i.e. “point in time” backup). Hebah ElGibreen

  11. Backup Strategies …Choosing the right backup • Whole vs. Partial Backups • If the database is very large, we may not have the time and resources to create a backup of the entire database in a single operation. • Instead, we might spread the activity over the course of a week and create a backup of just a portion of the database every night. • Consistent vs. Inconsistent Backups • A physical backup can be classified by being consistent or inconsistent. • Consistent backups are taken when the database is shut down normally or in a MOUNT state. • A database should be in ARCHIVELOG mode to be able to use an inconsistent backup method. Hebah ElGibreen

  12. Backup Strategies …Choosing the right backup • Hot vs. Cold Backups • Hot backup are generally considered synonymous with inconsistent backup, while cold backup are considered synonymous with consistent backup; but, if the database was not shut down gracefully, a cold backup also may contain inconsistencies. • Cold backups are similar to export backups because they are point-in-time backups and therefore of less value if up-to-the minute recovery of the database is required and the database is not in archivelogmode. • Another downside to cold backups is the amount of downtime necessary to perform the backup; any one will not be able to access the database during it. • Hot backups are inconsistent because, with the database open, there is no guarantee that the data files are synchronized with the control files. Inconsistent backups require recovery in order to be used. Hebah ElGibreen

  13. Backup Strategies …Choosing the right backup • Full vs. Incremental Backups • A distinct advantage to using an incremental backup in a recovery strategy is that archived and online redo log files may not be necessary to restore a database or tablespace to a consistent state. • Oracle Database 11g supports two levels of incremental backup. • A level 0 or baseline backup, like a full backup, contains all data blocks. • A level 1 incremental back up can be one of two types: cumulative or differential. • A cumulative backup backs up all changes since the last level 0 backup. • A differential backup backs up all changes since the last incremental backup (which could be a level 0 or a level 1). Hebah ElGibreen

  14. Backup Strategies …Choosing the right backup • Image Copies vs. Backupsets • Backup sets use less space on the disk or tape and it can be compressed to further reduce the space requirements of the backup. • Backupsets can be created and restored only with RMAN. • Image copies are full backups created by almost any backup environment (e.g. RMAN or operating system commands). Backup set Image copies Data file #4 Data file #1 Data file #5 Data file #2 Data file #6 Data file #3 Hebah ElGibreen

  15. Member 1 Member 2 Member 1 Disk 1 Disk 2 Member 2 Member 1 Member 2 Group 1 Group 2 Group 3 Configuring for Recoverability • To configure your database for maximum recoverability, you must: • Schedule regular backups • Multiplex control files • Multiplex redo log groups • Retain archived copies of redo logs Control files Archive log files Online redo log files Hebah ElGibreen

  16. Enterprise Manager : Backup Oracle 11g… Configuring Backup Schedule Backup Managing Backup Viewing Backup Job Hebah ElGibreen

  17. Configuring Backup Hebah ElGibreen

  18. Configuring Backup: Device Hebah ElGibreen

  19. Configuring Backup: Backup Set Hebah ElGibreen

  20. Configuring Backup: Policy Hebah ElGibreen

  21. Scheduling Backups: Strategy Hebah ElGibreen

  22. Scheduling Backups: Options Hebah ElGibreen

  23. Scheduling Backups: Settings Hebah ElGibreen

  24. Scheduling Backups: Schedule Hebah ElGibreen

  25. Scheduling Backups: Review Hebah ElGibreen

  26. Scheduling Backups: Review Hebah ElGibreen

  27. Managing Backup: Backup Sets Hebah ElGibreen

  28. Managing Backup: Image Copies Hebah ElGibreen

  29. Viewing Backup Job Hebah ElGibreen

  30. Viewing Backup Job: Edit Hebah ElGibreen

  31. References • “Beginning Oracle Database 11g Administration: From Novice to Professional”, By Iggy Fernandez, Apress. • Backup and Recovery Basics 11g Release 2 (11.2) [Online]. Available: http://docs.oracle.com/cd/B19306_01/backup.102/b14192.pdf • Oracle Database 11g: Administration Workshop I, student guide. Hebah ElGibreen

More Related