Chapter 7
Making Backups with RMAN
Objectives
 Explain backup sets and image copies
 RMAN Backup modes’
 Types of files backed up
 Backup destinations
 Specifying backup options
 Channels
 Output Device types
 Backup format
 Tags
Objectives (cont.)
 Control file and server parameter file (spfile)
 Choosing what to back up
 Flash recovery files
 Incremental backups
 Making copies
 Encryping backups
 Specifying backup windows
 Retaining backups
 Other backup features
Backup Command
 Use ‘backup’ command to back up:
– Datafiles
– Archived redo logs
– Control files
 Also used to:
– Make copies of datafiles
– Make backups of backup sets
Backup Command
 Basic steps:
– Connect to target database
– Ensure target database is in proper state
 Mount or open for archivelog database
 Mount for noarchivelog database
– Type ‘backup database’ at the RMAN prompt
Backup Sets & Image Copies
 The two types of backups created
 Backup Set
– Default backup method
– Contains one or more backup pieces
– One backup piece per backup set by default
– Limit piece size with ‘maxpiecesize’ parameter
– Limit set size with:
 ‘maxsetsize’ parameter
 ‘filesperset’ parameter
– Allows multiplexing (many files in backup set)
– Skips backing up unused blocks
Backup Sets & Image Copies (cont.)
 Image Copy
– Byte for byte image of original file
– Can be files not created with RMAN
 Incorporated into RMAN via ‘catalog’ command
– Preferred restore method used by RMAN
 Less overhead than recovery using backup set
 Can use ‘switch’ command to point database to replacement
file (no actual recovery needed)
RMAN Backup Modes
 Full vs. Incremental
– Full
 Means all allocated blocks in a given file
 Is the default backup type
– Incremental has two types
 Level 0 – same as full
 Level 1 – Includes only changed blocks since Level 0
RMAN Backup Modes
 Consistent vs. Inconsistent
– Consistent –
 Occurred in mount state after graceful shutdown
 No recovery needed
 Mandatory for noarchivelog databases
– Inconsistent –
 occurred when database is open or after database crash
 Recovery always needed
 For archivelogmode databases
Types of Files RMAN Backs up
 Datafiles
 Control Files
 Archived Redo logs
 Image copies of datafiles and control files
 Backup pieces that contain RMAN backups
 Server parameter file (spfile)
 Online redo logs NOT backed up
RMAN Backup Destinations
 Disk directory
 Media management library (tape device)
 Flash recovery area
Specifying Backup Options
 If overriding configured defaults for:
– Channels
– Output Device Type
– Image Copy or Backup Set Output
– Backup Format
– Tags for Backup Output
Channels
 One disk channel preconfigured
 For tape
– configure automatic channel, or
– Manually allocate tape channel at backup time
Output Device Type
 Done using ‘device type’ clause of backup
command
 Tape devices must be preconfigured to use
Image Copy or Backup Set
 Backup set is default
 For image copy, done using ‘as copy’ clause of
backup command
 For backupset, done using ‘as backupset’ clause
of backup command
Backup Format
 Refers to naming of the RMAN backup files
 Names specified in the following ways:
– Using ‘format’ clause of backup command
– Configure format setting for channel
– Configure format setting for device type
 If not specified, default names/locations based on
O/S specific rules
Tags for Backup Output
 Assigns unique name to each backup
 Done using ‘tag’ parameter of backup command
 If not specified, RMAN assigns default tag
Backing Up the Control file
 Recommended to use automatic backups of control file
– Can restore without control file or recovery catalog
– Backed up as standalone backup piece
 Placed in default location or flash recovery area
 Spfile also backed up
 Can be done manually
– Included in backup for datafile 1
Backing Up the Spfile
 Done using backup spfile command
 Database must be started with spfile
 Only backs up current spfile
 Also backed up with control file backup
Backing Up Datafiles
 Done via ‘backup datafile’ command
 Can back up files by name or number
 Can back up individual datafiles
– Including incremental backups
 Use either backup or image copy
Backing Up Tablespaces
 Done via ‘backup tablespace’ command
 Can back up individual tablespaces
– Including incremental backups
 Use either backup or image copy
 Transportable tablespaces have backup limitations
depending on Oracle version
Backing up Whole Database
 Done via ‘backup database’ command
 Backs up all datafiles
 If autobackup on, will back up control file and
spfile
 Does not back up archived redo logs
 Backup can be consistent or inconsistent
– Consistent must be taken in mount state after normal
shutdown (i.e. – not aborted)
– Inconsistent means backup taken after abnormal
shutdown or if database is open
Backing up Archived Redo Logs
 Done via ‘backup archivelog’ command
 Backs up single copy of each log
 Can delete O/S file after backup
 Can backup by location, time, sequence number
Backing up Archived Redo (cont.)
 Can be backed up during full database backup
 When using ‘backup database plus archivelog’
command, the following things occur:
1. Alter system archive log current
2. Backup archivelog all
3. The database datafiles are backed up
4. Alter system archive log current (again)
5. Backs up new archive logs generated since backup
started
Backing up Everything
 Everything means
– control file
– Datafiles
– Archived redo logs
– Spfile
 Commands to be run:
 Verify backups via ‘list backup by file’ command
Backing up Flash Recovery Files
 Done via clauses of backup command:
– ‘recovery area’
– Db_recovery_file_dest
 ‘Backup recovery area’ backs up files in flash
recovery area
 ‘backup recovery files’ backs up all disk
recovery files, regardless of location
 Must specify tape device for flash recovery
area files
Flash Recovery Files (cont.)
 Includes:
– Full and incremental backup sets
– control file autobackups
– Archived redo logs
– Datafile copies
 Does not include:
– Flashback logs
– Current control file
– Online redo logs
Performing Incremental Backups
 Backs up only changed data
– Complete backups within provided windows
– Saves storage space
– Uses SCN as basis
 Two kinds of incremental backups
– Differential (default)
– Cumulative
Differential Incremental Backups
 Is the default for incremental backups
 Backs up changed blocks since either
– Level 0 backup, or
 Can be image copies or backup sets
– Level 1 backup
 Can only be backup sets
 Faster than level 0 since only changed blocks backed up
Cumulative Incremental Backups
 Backs up changed blocks since most recent
level-0 backup
Differential vs. Cumulative
 Differential incremental backups
– Takes less space
– Takes longer to recover
 Cumulative incremental backups
– Takes more space
– Takes less time to recover
Incrementals: Things to Remember
 You can back up:
– Datafile
– Datafile Copy
– Tablespace
– Database
 You cannot back up:
– control files
– Archived redo logs
– Backup set
 Tips
– Use block change tracking to reduce backup time
RMAN-ski – Making Copies!
 Creating Multiple Backup Sets
– Done via ‘copies’ or ‘set backup copies’
 Making Copies of Backup Sets
– Done via ‘backup … backupset’
 Making Copies of Image Copies
– Done via ‘backup as copy/backupset’
 Making Tape Copies of Disk Image Copies
– Done via ‘backup datafilecopy’ or backup … copy’
Encrypting RMAN Backups
 Two types
– Transparent encryption (default encryption mode)
– Password encryption
 Encryption is turned off by default
 Steps to use transparent encryption:
– Configuration of Oracle Encryption Wallet
– Open the wallet
– Use configure command to create encrypted backups
 Password encryption done via ‘set encryption’ command
 Both encryption types can be used at the same time
 Encryption for database or tablespace backups
Specifying Backup Windows
 Done via ‘duration’ parameter of ‘backup’ command
 Helps backups to run within specified window
 Can force long backup to stop
 Helps manage system resources during backup
Retaining Backups
 Done via ‘keep’ option of ‘backup’ command
 Means keeping backups beyond retention policies
 Also known as ‘archival backups’
Other Backup Features
 Exclude tablespaces from a backup
 Skip read-only, offline, or inaccessible files
 Can compress backups to save storage
 Can parallelize backups to save time
 Can parallel backups of large files
 Reuse backup files
 Can backup only files not backed up
 Can restart backups after a crash
 Can update image copy backups

More Related Content

PPT
Les 05 Create Bu
PPT
Less15 Backups
PDF
RMAN – The Pocket Knife of a DBA
PDF
Collaborate 2012 - RMAN Eliminate the mystery
PPT
Backups And Recovery
PPT
Les 05 create_bu
PPT
Les 07 Rman Rec
PPTX
What’s new in oracle 12c recovery manager (rman)
Les 05 Create Bu
Less15 Backups
RMAN – The Pocket Knife of a DBA
Collaborate 2012 - RMAN Eliminate the mystery
Backups And Recovery
Les 05 create_bu
Les 07 Rman Rec
What’s new in oracle 12c recovery manager (rman)

Similar to 7035416.ppt (20)

PPT
Les 04 config_bu
DOC
Backup and Recovery Procedure
PPT
Oracle backup and recovery
PDF
Collaborate 2012 - RMAN eliminate the mystery
PPT
PDF
Rman Presentation
PPT
Les 04 Config Bu
PDF
Oracle 12c New Features_RMAN_slides
PDF
Rman workshop short
PDF
Ioug tip book11_gunukula
PPT
Les 07 rman_rec
PPTX
10 Problems with your RMAN backup script
PPT
5895640.ppt
PDF
Oracle Backup Solutions Overview August 2018
PPT
Les 02 Config Rec
PPTX
Backup & recovery with rman
PDF
UKOUG - RMAN Back to Basics - Oct 2017
PDF
Colvin RMAN New Features
PDF
How to survive a disaster with RMAN
PDF
Presentation recovery manager (rman) configuration and performance tuning ...
Les 04 config_bu
Backup and Recovery Procedure
Oracle backup and recovery
Collaborate 2012 - RMAN eliminate the mystery
Rman Presentation
Les 04 Config Bu
Oracle 12c New Features_RMAN_slides
Rman workshop short
Ioug tip book11_gunukula
Les 07 rman_rec
10 Problems with your RMAN backup script
5895640.ppt
Oracle Backup Solutions Overview August 2018
Les 02 Config Rec
Backup & recovery with rman
UKOUG - RMAN Back to Basics - Oct 2017
Colvin RMAN New Features
How to survive a disaster with RMAN
Presentation recovery manager (rman) configuration and performance tuning ...
Ad

More from hesham alataby (10)

PPT
Frames.ppt
PPT
HyperLinks.ppt
PPT
Images_Amended.ppt
PPT
Tables.ppt
PPT
TextTags.1.ppt
PPT
TextTags.2.ppt
PPTX
fdocuments.in_the-model-clause-explained (1).pptx
PPT
15362590.ppt
PPT
4714649_2.ppt
PPT
4714649.ppt
Frames.ppt
HyperLinks.ppt
Images_Amended.ppt
Tables.ppt
TextTags.1.ppt
TextTags.2.ppt
fdocuments.in_the-model-clause-explained (1).pptx
15362590.ppt
4714649_2.ppt
4714649.ppt
Ad

Recently uploaded (20)

PPTX
Thinking Routines and Learning Engagements.pptx
PDF
Chevening Scholarship Application and Interview Preparation Guide
PDF
Disorder of Endocrine system (1).pdfyyhyyyy
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
PDF
Solved Past paper of Pediatric Health Nursing PHN BS Nursing 5th Semester
PDF
African Communication Research: A review
PPTX
UNIT_2-__LIPIDS[1].pptx.................
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PPTX
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
PPTX
PLASMA AND ITS CONSTITUENTS 123.pptx
PDF
fundamentals-of-heat-and-mass-transfer-6th-edition_incropera.pdf
PDF
Hospital Case Study .architecture design
PDF
The TKT Course. Modules 1, 2, 3.for self study
PPTX
4. Diagnosis and treatment planning in RPD.pptx
PDF
Farming Based Livelihood Systems English Notes
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PPTX
Diploma pharmaceutics notes..helps diploma students
PDF
Journal of Dental Science - UDMY (2021).pdf
PDF
Compact First Student's Book Cambridge Official
PDF
Literature_Review_methods_ BRACU_MKT426 course material
Thinking Routines and Learning Engagements.pptx
Chevening Scholarship Application and Interview Preparation Guide
Disorder of Endocrine system (1).pdfyyhyyyy
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
Solved Past paper of Pediatric Health Nursing PHN BS Nursing 5th Semester
African Communication Research: A review
UNIT_2-__LIPIDS[1].pptx.................
2025 High Blood Pressure Guideline Slide Set.pptx
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
PLASMA AND ITS CONSTITUENTS 123.pptx
fundamentals-of-heat-and-mass-transfer-6th-edition_incropera.pdf
Hospital Case Study .architecture design
The TKT Course. Modules 1, 2, 3.for self study
4. Diagnosis and treatment planning in RPD.pptx
Farming Based Livelihood Systems English Notes
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
Diploma pharmaceutics notes..helps diploma students
Journal of Dental Science - UDMY (2021).pdf
Compact First Student's Book Cambridge Official
Literature_Review_methods_ BRACU_MKT426 course material

7035416.ppt

  • 2. Objectives  Explain backup sets and image copies  RMAN Backup modes’  Types of files backed up  Backup destinations  Specifying backup options  Channels  Output Device types  Backup format  Tags
  • 3. Objectives (cont.)  Control file and server parameter file (spfile)  Choosing what to back up  Flash recovery files  Incremental backups  Making copies  Encryping backups  Specifying backup windows  Retaining backups  Other backup features
  • 4. Backup Command  Use ‘backup’ command to back up: – Datafiles – Archived redo logs – Control files  Also used to: – Make copies of datafiles – Make backups of backup sets
  • 5. Backup Command  Basic steps: – Connect to target database – Ensure target database is in proper state  Mount or open for archivelog database  Mount for noarchivelog database – Type ‘backup database’ at the RMAN prompt
  • 6. Backup Sets & Image Copies  The two types of backups created  Backup Set – Default backup method – Contains one or more backup pieces – One backup piece per backup set by default – Limit piece size with ‘maxpiecesize’ parameter – Limit set size with:  ‘maxsetsize’ parameter  ‘filesperset’ parameter – Allows multiplexing (many files in backup set) – Skips backing up unused blocks
  • 7. Backup Sets & Image Copies (cont.)  Image Copy – Byte for byte image of original file – Can be files not created with RMAN  Incorporated into RMAN via ‘catalog’ command – Preferred restore method used by RMAN  Less overhead than recovery using backup set  Can use ‘switch’ command to point database to replacement file (no actual recovery needed)
  • 8. RMAN Backup Modes  Full vs. Incremental – Full  Means all allocated blocks in a given file  Is the default backup type – Incremental has two types  Level 0 – same as full  Level 1 – Includes only changed blocks since Level 0
  • 9. RMAN Backup Modes  Consistent vs. Inconsistent – Consistent –  Occurred in mount state after graceful shutdown  No recovery needed  Mandatory for noarchivelog databases – Inconsistent –  occurred when database is open or after database crash  Recovery always needed  For archivelogmode databases
  • 10. Types of Files RMAN Backs up  Datafiles  Control Files  Archived Redo logs  Image copies of datafiles and control files  Backup pieces that contain RMAN backups  Server parameter file (spfile)  Online redo logs NOT backed up
  • 11. RMAN Backup Destinations  Disk directory  Media management library (tape device)  Flash recovery area
  • 12. Specifying Backup Options  If overriding configured defaults for: – Channels – Output Device Type – Image Copy or Backup Set Output – Backup Format – Tags for Backup Output
  • 13. Channels  One disk channel preconfigured  For tape – configure automatic channel, or – Manually allocate tape channel at backup time
  • 14. Output Device Type  Done using ‘device type’ clause of backup command  Tape devices must be preconfigured to use
  • 15. Image Copy or Backup Set  Backup set is default  For image copy, done using ‘as copy’ clause of backup command  For backupset, done using ‘as backupset’ clause of backup command
  • 16. Backup Format  Refers to naming of the RMAN backup files  Names specified in the following ways: – Using ‘format’ clause of backup command – Configure format setting for channel – Configure format setting for device type  If not specified, default names/locations based on O/S specific rules
  • 17. Tags for Backup Output  Assigns unique name to each backup  Done using ‘tag’ parameter of backup command  If not specified, RMAN assigns default tag
  • 18. Backing Up the Control file  Recommended to use automatic backups of control file – Can restore without control file or recovery catalog – Backed up as standalone backup piece  Placed in default location or flash recovery area  Spfile also backed up  Can be done manually – Included in backup for datafile 1
  • 19. Backing Up the Spfile  Done using backup spfile command  Database must be started with spfile  Only backs up current spfile  Also backed up with control file backup
  • 20. Backing Up Datafiles  Done via ‘backup datafile’ command  Can back up files by name or number  Can back up individual datafiles – Including incremental backups  Use either backup or image copy
  • 21. Backing Up Tablespaces  Done via ‘backup tablespace’ command  Can back up individual tablespaces – Including incremental backups  Use either backup or image copy  Transportable tablespaces have backup limitations depending on Oracle version
  • 22. Backing up Whole Database  Done via ‘backup database’ command  Backs up all datafiles  If autobackup on, will back up control file and spfile  Does not back up archived redo logs  Backup can be consistent or inconsistent – Consistent must be taken in mount state after normal shutdown (i.e. – not aborted) – Inconsistent means backup taken after abnormal shutdown or if database is open
  • 23. Backing up Archived Redo Logs  Done via ‘backup archivelog’ command  Backs up single copy of each log  Can delete O/S file after backup  Can backup by location, time, sequence number
  • 24. Backing up Archived Redo (cont.)  Can be backed up during full database backup  When using ‘backup database plus archivelog’ command, the following things occur: 1. Alter system archive log current 2. Backup archivelog all 3. The database datafiles are backed up 4. Alter system archive log current (again) 5. Backs up new archive logs generated since backup started
  • 25. Backing up Everything  Everything means – control file – Datafiles – Archived redo logs – Spfile  Commands to be run:  Verify backups via ‘list backup by file’ command
  • 26. Backing up Flash Recovery Files  Done via clauses of backup command: – ‘recovery area’ – Db_recovery_file_dest  ‘Backup recovery area’ backs up files in flash recovery area  ‘backup recovery files’ backs up all disk recovery files, regardless of location  Must specify tape device for flash recovery area files
  • 27. Flash Recovery Files (cont.)  Includes: – Full and incremental backup sets – control file autobackups – Archived redo logs – Datafile copies  Does not include: – Flashback logs – Current control file – Online redo logs
  • 28. Performing Incremental Backups  Backs up only changed data – Complete backups within provided windows – Saves storage space – Uses SCN as basis  Two kinds of incremental backups – Differential (default) – Cumulative
  • 29. Differential Incremental Backups  Is the default for incremental backups  Backs up changed blocks since either – Level 0 backup, or  Can be image copies or backup sets – Level 1 backup  Can only be backup sets  Faster than level 0 since only changed blocks backed up
  • 30. Cumulative Incremental Backups  Backs up changed blocks since most recent level-0 backup
  • 31. Differential vs. Cumulative  Differential incremental backups – Takes less space – Takes longer to recover  Cumulative incremental backups – Takes more space – Takes less time to recover
  • 32. Incrementals: Things to Remember  You can back up: – Datafile – Datafile Copy – Tablespace – Database  You cannot back up: – control files – Archived redo logs – Backup set  Tips – Use block change tracking to reduce backup time
  • 33. RMAN-ski – Making Copies!  Creating Multiple Backup Sets – Done via ‘copies’ or ‘set backup copies’  Making Copies of Backup Sets – Done via ‘backup … backupset’  Making Copies of Image Copies – Done via ‘backup as copy/backupset’  Making Tape Copies of Disk Image Copies – Done via ‘backup datafilecopy’ or backup … copy’
  • 34. Encrypting RMAN Backups  Two types – Transparent encryption (default encryption mode) – Password encryption  Encryption is turned off by default  Steps to use transparent encryption: – Configuration of Oracle Encryption Wallet – Open the wallet – Use configure command to create encrypted backups  Password encryption done via ‘set encryption’ command  Both encryption types can be used at the same time  Encryption for database or tablespace backups
  • 35. Specifying Backup Windows  Done via ‘duration’ parameter of ‘backup’ command  Helps backups to run within specified window  Can force long backup to stop  Helps manage system resources during backup
  • 36. Retaining Backups  Done via ‘keep’ option of ‘backup’ command  Means keeping backups beyond retention policies  Also known as ‘archival backups’
  • 37. Other Backup Features  Exclude tablespaces from a backup  Skip read-only, offline, or inaccessible files  Can compress backups to save storage  Can parallelize backups to save time  Can parallel backups of large files  Reuse backup files  Can backup only files not backed up  Can restart backups after a crash  Can update image copy backups