oracle 如何不备份已经备份的归档

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:25

oracle 如何不备份已经备份的归档

在Oracle数据库备份归档日志时,通常会保存最近几天的归档日志文件不删除。
如:
backup archivelog all;
delete noprompt archivelog all completed before 'sysdate -14'; 在本地保留14天的归档日志.
再备份时,归档会重复再备份一次。
加上一个子句 not backed up 1 times,就可以实现不备份已经归档的日志。
命令如下:
backup archivelog all not backed up 1 times;  不备份上次已经备份的归档

Backing Up Only Archived Redo Logs That Need Backups
You can indicate that RMAN should automatically skip backups of archived redo logs in the following ways:
Configuring backup optimization

As explained in "Configuring Backup Optimization", if you enable backup optimization, then the BACKUP ARCHIVELOG command skips backing up files when an identical archived log has already been backed up to the specified device type. An archived log is considered identical to another when it has the same DBID, thread, sequence number, and RESETLOGS SCN and time.
Configure an archived redo log deletion policy

As explained in "Configuring an Archived Redo Log Deletion Policy", if the deletion policy is configured with the BACKED UP integer TIMES clause, then a BACKUP ARCHIVELOG command copies the logs unless integer backups already exist on the specified device type. If integer backups of the logs exist, then the BACKUP ARCHIVELOG command skips the logs.
The BACKUP ... NOT BACKED UP integer TIMES command specifies that RMAN should back up only those archived log files that have not been backed up at least integer times to the specified device. To determine the number of backups for a file, RMAN only considers backups created on the same device type as the current backup.

The BACKED UP clause is a convenient way to back up archived logs to a specified device type. For example, you can specify that RMAN should keep two copies of each archived redo log on tape and skip additional backups.

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】