RMAN Backup Types
Full Backups
A full backup is different from a whole database backup.
A full data file backup is a backup that includes every used data block in the file.
RMAN copies all blocks into the backup set or image copy, skipping only data file blocks that have never been used.
For a full image copy, the entire file contents are reproduced exactly.
A full backup cannot be part of an incremental backup strategy; it cannot be the parent for a subsequent incremental backup.
Incremental Backups
An incremental backup is either a level 0 backup, which includes every block in the data files except blocks that have never been used, or a level 1 backup, which includes only those blocks that have been changed since a previous backup was taken.
-------------------------------------------------------------------------------
1) A level 0 incremental backup is physically identical to a full backup.
2) The only difference is that the level 0 backup can be used as the base for a level 1 backup, but a full backup can never be used as the base for a level 1 backup.
-------------------------------------------------------------------------------
Incremental backups are specified through the INCREMENTAL keyword of the BACKUP command.
You specify INCREMENTAL LEVEL = [0 | 1].
RMAN incremental backups back up only datafile blocks that have changed since a specified previous backup.
You can make incremental backups of databases, individual tablespaces, or datafiles.
There are two types of incremental level 1 (L1) backup:
1. Differential Incremental Backup
2. Cumulative Incremental Backup
RMAN can create multilevel incremental backups as follows:
• Differential Incremental Backup:
which backs up all blocks changed after the most recent incremental backup at level 1 or 0
• Cumulative Incremental Backup:
which backs up all blocks changed after the most recent incremental backup at level 0
A cumulative incremental backup, backs up all the blocks that have changed after the most recent incremental backup at level 0 only.
This reduces the work needed when recovering after a restore as only the desired level 1 is required to be applied instead of several level 1 in sequence. The trade off is as every level 1 backup needs to backup all the blocks changed from the last level 0, it is repeated the work done by the previous level 1, thus require more space and more time.
Examples:-
• To perform Full Backup of the database use the following command:
Note:- This won't be incremental backup strategy
RMAN> BACKUP DATABASE;
• To perform an incremental backup at level 0, use the following command:
RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;
• To perform a differential incremental backup, use the following command:
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;
• To perform a cumulative incremental backup, use the following command:
RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
RMAN makes full backups by default if neither FULL nor INCREMENTAL is specified.
Unused block compression causes never-written blocks to be skipped when backing up data files to backup sets, even for full backups.
A full backup has no effect on subsequent incremental backups, and is not considered part of any incremental backup strategy, although a full image copy backup can be incrementally updated by applying incremental backups with the RECOVER command.
All below command perform incremental level 0 backup.
1) To take an incremental level 0 backup of your Database
RMAN> backup incremental level 0 database;
2) To take an incremental level 0 backup of Tablespace users
RMAN> backup incremental level 0 tablespace users;
3) To take an incremental level 0 backup of datafile 4
RMAN> backup incremental level 0 datafile 4;
All below command perform incremental level 1 backup.
1) To take an incremental level 1 backup of database
RMAN> backup incremental level 1 database;
2)To take an incremental level 1 backup of tablespace users
RMAN> backup incremental level 1 tablespace users;
3) To take an incremental level 1 backup of datafile 1
RMAN> backup incremental level 1 datafile 4;
All below command perform level 1 cumulative incremental backup.
1) To take an incremental level 1 cumulative backup of database:
RMAN> backup incremental level 1 cumulative database;
2) To take an incremental level 1 cumulative backup of tablespace users:
RMAN> backup incremental level 1 cumulative tablespace users;
3) To take an incremental level 1 cumulative backup of datafile 4
RMAN> backup incremental level 1 cumulative datafile 4;
No comments:
Post a Comment