数据仓库的备份

Posted by wukaiqiang; tagged with none

1、数据库数据量超过1TB之后, 受限于读写设备、网络流量、cpu、内存的资源的限制,数据备份和恢复的速度会超过预计规划的RTO.

官方对vldb(VERY LARGE DATABASE)的备份恢复有相应概述

In the following example, RMAN backs up all database files that have not been backed up in the last 7 days first, runs for 4 hours, and reads the blocks as fast as possible.

BACKUP DATABASE NOT BACKED UP SINCE 'sysdate - 7'
PARTIAL DURATION 4:00 MINIMIZE TIME;

The DURATION clause enables you to reduce the performance impact of RMAN backups respectively it sets a certain time limit for the backup.

Let’s suppose your RMAN backup takes one hour now and you take it online while end users work with the database. This reduces the performance impact of the online backup by half approximately:

RMAN> backup duration 02:00 minimize load database;

The first two digits are hours, the second two digits are minutes. Above command tells RMAN to spend 02 hours and 00 minutes with the backup that takes normally one hour. That way, RMAN gets throttled down, causing roughly half the load on the system than otherwise.

In another scenario, let’s suppose that you want to limit the backup run to take only 30 minutes every night, because you want to run a batch job afterwards that must not be impacted by the backup. Without the limit, backup takes one hour. You are fine with backing up only half of your datafiles every night. This command does the trick:

RMAN> backup duration 00:30 partial minimize time database 
      not backed up since time='sysdate-1' filesperset 1;

RMAN will backup as many datafiles as possible within 30 minutes, generating one backuset per datafile. It stops after 30 minutes. Tomorrow, the remaining datafiles are being backed up. Drawback is that it takes longer in case to recover the datafiles that have two days old backups.

This is one little topic from the Oracle Database 12c Backup and Recovery Workshop that I deliver this week in Prague. Great city, by the way