RUN
{
RECOVER COPY OF DATABASE
WITH TAG 'incr_update';
BACKUP
INCREMENTAL LEVEL 1
FOR RECOVER OF COPY WITH TAG 'incr_update'
DATABASE;
}
The
BACKUPcommand in script does not always create a level 1 incremental backup.The
RECOVERcommand in script causes RMAN to apply any available incremental level 1 backups with the specified tag to a set of data file copies with the same tag.
Effect of Basic Script When Run Daily:
| Command | Monday | Tuesday | Wednesday | Thursday Onward |
|---|---|---|---|---|
| Because no incremental backup or data file copy exists, the command generates a message (but not an error). That is, the command has no effect. | A database copy now exists, but no incremental level 1 backup exists with which to recover it. Thus, the | The level 1 incremental backup made on Tuesday is applied to the database copy, bringing the copy up to the checkpoint SCN of the level 1 incremental backup. | The level 1 incremental backup made yesterday is applied to the database copy, bringing the copy up to the checkpoint SCN of the level 1 incremental backup. |
| No level 0 image copy exists, so the command creates an image copy of the database and applies the tag Note: If the script sets | The command makes an incremental level 1 backup and assigns it the tag | The command makes an incremental level 1 backup and assigns it the tag | The command makes an incremental level 1 backup and assigns it the tag |
//9.7.4 Incrementally Updating Backups
Common Backup Options
| Option | Description | Example |
|---|---|---|
| Specifies a location and name for backup pieces and copies. You must use substitution variables to generate unique file names. The most common substitution variable is | BACKUP FORMAT 'AL_%d/%t/%s/%p' ARCHIVELOG LIKE '%arc_dest%'; |
| Specifies a user-defined string as a label for the backup. If you do not specify a tag, then RMAN assigns a default tag with the date and time. Tags are always stored in the RMAN repository in uppercase. | BACKUP TAG 'weekly_full_db_bkup' DATABASE MAXSETSIZE 10M; |
If you specify
BACKUPASCOPY, then RMAN copies each file as an image copy, which is a bit-for-bit copy of a database file created on disk. Image copies are identical to copies created with operating system commands likecpon Linux orCOPYon Windows, but are recorded in the RMAN repository and so are usable by RMAN. You can use RMAN to make image copies while the database is open.




