less15 backups

22
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups

Upload: vivaankumar

Post on 06-May-2015

2.354 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Less15 Backups

15Copyright © 2007, Oracle. All rights reserved.

Performing Database Backups

Page 2: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 2

Objectives

After completing this lesson, you should be able to:

• Create consistent database backups

• Back up your database without shutting it down

• Create incremental backups

• Automate database backups

• Manage backups and view backup reports

• Monitor the flash recovery area

Page 3: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 3

Backup Solutions: Overview

Backups can be performed by using:

• Recovery Manager

• Oracle Secure Backup

• User-managed backup

Image copies

Backup pieces

Backup data

Data files

Flash recovery area

Target database

Redundant archive log

files

Archive log files

Page 4: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 4

Oracle Secure Backup

• Oracle Secure Backup and RMAN provide an end-to-end backup solution for Oracle environments:– Centralized tape backup management for file system data

and the Oracle database– Most well-integrated media management layer for RMAN

backups– Backup of any data anywhere on the network

• A single technical support resource for the entire backup solution expedites problem resolution.

• This ensures reliable data protection at lower cost and complexity.

Page 5: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 5

User-Managed Backup

A user-managed scenario:

• Is a manual process of tracking backup needs and status

• Typically uses your own written scripts

• Requires that database files be put in the correct mode for backup

• Relies on operating system commands to make backups of files

Page 6: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 6

Terminology

• Backup strategy may include:– Entire database (whole)– Portion of the database (partial)

• Backup type may indicate inclusion of:– All data blocks within your chosen files (full)– Only information that has changed since a previous

backup (incremental)— Cumulative (changes up to last level 0)— Differential (changes up to last incremental)

• Backup mode may be:– Offline (consistent, cold)– Online (inconsistent, hot)

DatabaseData files

Online redo log

files

Control files

Page 7: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 7

Terminology

Backups may be stored as:

• Image copies

• Backup sets

Data file #2

Data file #3

Data file #4

Data file #5

Data file #1

Data file #6Image copies

(Duplicate data and log files in OS format)

Backup set(Binary, compressed files in Oracle proprietary format)

Data file #1 Data file #2

Data file #3 Data file #4

Data file #5 Data file #6

Page 8: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 8

Recovery Manager (RMAN)

• Powerful control and scripting language

• Integrated with Enterprise Manager

• Published API that enables interface with most popular backup software

• Backing up data, control, archived log, and server parameter files

• Backing up files to the disk or tape

Page 9: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 9

Configuring Backup Settings

Page 10: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 10

Configuring Backup Settings

Changetracking

fileData files

Backup

pieces

Recovery area

Best practice

Page 11: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 11

Scheduling Backups: Strategy

Page 12: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 12

Scheduling Backups: Options

Page 13: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 13

Scheduling Backups: Settings

Page 14: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 14

Scheduling Backups: Schedule

Page 15: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 15

Scheduling Backups: Review

Page 16: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 16

Backing Up the Control File to a Trace File

Control files have an additional backup option.

Control file trace backups may be used to recover from loss of all control files.

Page 17: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 17

Managing Backups

Page 18: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 18

Viewing Backup Reports

Page 19: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 19

Monitoring the Flash Recovery Area

Page 20: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 20

Using the RMAN Command Line

$ rman target /

RMAN> CONFIGURE …

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Controlfile SPFILEArchived log

fileData filesControl

files

Copies of

1

2

3

Page 21: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 21

Summary

In this lesson, you should have learned how to:

• Create consistent database backups

• Back up your database without shutting it down

• Create incremental backups

• Automate database backups

• Manage backups and view backup reports

• Monitor the flash recovery area

Page 22: Less15 Backups

Copyright © 2007, Oracle. All rights reserved.15 - 22

Practice 15 Overview:Creating Database Backups

This practice covers the following topics:

• Backing up your database while the database is open for user activity

• Scheduling automatic nightly incremental backups for your database