暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Incrementally Updating Backups

许玉冲 2024-09-09
90
RUN
{
  RECOVER COPY OF DATABASE 
    WITH TAG 'incr_update';
  BACKUP 
    INCREMENTAL LEVEL 1
    FOR RECOVER OF COPY WITH TAG 'incr_update'
    DATABASE;
}


  • The BACKUP command in script does not always create a level 1 incremental backup.

  • The RECOVER command 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:

CommandMondayTuesdayWednesdayThursday Onward

RECOVER

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 RECOVER command has no effect.

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.

BACKUP

No level 0 image copy exists, so the command creates an image copy of the database and applies the tag incr_update. This copy is needed to begin the cycle of incremental updates.

Note: If the script sets DEVICE TYPE sbt, then the first run creates the copy on disk, not on tape. Subsequent runs make level 1 backups on tape.

The command makes an incremental level 1 backup and assigns it the tag incr_update. This backup contains blocks that changed between Monday and Tuesday.

The command makes an incremental level 1 backup and assigns it the tag incr_update. This backup contains blocks that changed between Tuesday and Wednesday.

The command makes an incremental level 1 backup and assigns it the tag incr_update. This backup contains blocks that changed between now and the most recent backup with the tag incr_update.


//9.7.4 Incrementally Updating Backups


Common Backup Options

OptionDescriptionExample

FORMAT

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 %U, which generates a unique name. Others include %d for the DB_NAME, %t for the backup set time stamp, %s for the backup set number, and %p for the backup piece number.

BACKUP 
  FORMAT 'AL_%d/%t/%s/%p' 
  ARCHIVELOG LIKE '%arc_dest%';

TAG

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 BACKUP AS COPY, 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 like cp on Linux or COPY on 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.












「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论