RMAN Restartable Backups

Restartable Backups:
http://www.nyoug.org/Presentations/2010/December/Chien_RMAN.pdf

Using the restartable backups feature, RMAN can back up only those files that have not been backed up since a specified date. Use this feature after a backup fails to back up the parts of the database missed by the failed backup.
The unit of restartability is a backup set. If the backup generates multiple backup sets, then the backups that completed successfully do not have to be rerun. If the entire database is written into one backup set, and if the backup fails halfway through, then the entire backup has to be restarted.
To take better advantage of restartable backups, you can use set the MAXSETSIZE parameter of the BACKUP command. If, for instance, you set MAXSETSIZE to 10MB for a given backup command, a new backup set is produced for each 10MB of backup output. If the backup fails after some backup sets have been produced and must be restarted, the data backed up in those backup sets will not have to be backed up again. (Note that MAXSETSIZE must be large enough that any file can be accomodated in a single backup piece, because files cannot span backup pieces.)
For example, if the largest datafile is less than 10 MB, then you can back up the database daily as follows:
BACKUP DATABASE MAXSETSIZE = 10M;

Then, after a failure you can back up all files in the database that were not backed up in the last 24 hours by issuing:
BACKUP DATABASE NOT BACKED UP SINCE TIME 'SYSDATE-1';

If the SINCE TIME is later than the completion time, then RMAN backs up the file. If you use "BACKUP DATABASE NOT BACKED UP" without the SINCE TIME parameter, then RMAN only backs up files that have never been backed up.
When determining whether a file has been backed up, RMAN compares the SINCE TIME date with the completion time of the most recent backup of the file. The completion time for a backup piece is the completion time of the entire backup set, not an individual backup piece; in other words, all files in the same backup set have the same completion time.

Restarting a Backup After It Partially Completes

Use the SINCE TIME parameter of the BACKUP command to specify a date after which a new backup is required. If you do not specify the SINCE parameter, then RMAN only backs up files that have never been backed up.
To only back up files that were not backed up after a specified date:
Specify a valid date in the SINCE TIME parameter. For example, this command uses the default configured channel to back up all database files and archived redo logs that have not been backed up in the last two weeks:
RMAN> BACKUP NOT BACKED UP SINCE TIME 'SYSDATE-14'
          DATABASE PLUS ARCHIVELOG;

Backups to CD, DVD and Other Disk Devices with Large Block Sizes

When backing up database files to DISK, the logical block size of the database file to be backed up must be an even multiple of the physical block size of the destination device. For example, a DISK device with a block size of 2K can only be used as a destination for backups of database files with logical block sizes of 2K, 4K, 6K and so on. In practice, most disk drives have physical block sizes of 512 bytes, so this limitation rarely affects backup to disk drives. However, you can encounter this limitation when using BACKUP ... DEVICE TYPE DISK to back your database up to a writeable CD or DVD, or some other device which has a larger physical block size.


Backup Optimization

If you enable backup optimization, then the BACKUP command skips backing up files when the identical file has already been backed up to the specified device type.

Rules for Identifying Identical Files for Backup Optimization

Table 2-2 describes criteria that RMAN uses to determine whether a file is identical to a file that it already backed up.

Table 2-2 Criteria to Determine an Identical File
Type of FileCriteria to Determine an Identical File
Datafile
The datafile must have the same DBID, checkpoint SCN, creation SCN, and RESETLOGS SCN and time as a datafile already in a backup. The datafile must be offline-normal, read-only, or closed normally.
Archived redo log
Same thread, sequence number, and RESETLOGS SCN and time.
Backup set
Same backup set recid and stamp.
If RMAN determines that a file is identical and it has already been backed up, then it is a candidate to be skipped. However, RMAN must do further checking to determine whether to skip the file, because both the retention policy and the backup duplexing feature are factors in the algorithm that determines whether RMAN has sufficient backups on the specified device type.

=============================================================================

Comments