Oracle添加数据文件触发RMAN自动备份控制文件
1,104 total views, 1 views today
当RMAN中开启控制文件自动备份时,有两种情况自动触发备份控制文件。
1 2 |
CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/database/backup/data/arc_20200911/spfile_%F'; # 最好配置路径,如果不写路径,控制文件默认备份到 $ORACLE_HOME/dbs目录下 |
情况1:
rman备份成功后,自动备份控制文件。
情况2:
在开启归档模式后,如果执行增加表空间、添加数据文件、redo logs等改变了数据库结构的行为,都会触发自动备份控制文件的操作。
注意,添加数据文件后,并不会立即触发自动备份控制文件,而是要等待10分钟左右才备份。
参考资料:
官方文档:https://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmcncpt.htm#i1016424
Control File and Server Parameter File Autobackups
Having recent backups of your control file and server parameter file is extremely valuable in many recovery situations. To ensure that you have backups of these files, the database supports control file and server parameter file autobackups. The autobackup occurs independently of any backup of the current control file explicitly requested as part of your BACKUP command.With a control file autobackup, RMAN can recover the database even if the current control file, recovery catalog, and server parameter file are inaccessible. Because the path used to store the autobackup follows a well-known format, RMAN can search for and restore the server parameter file from that autobackup. After you have started the instance with the restored server parameter file, RMAN can restore the control file from the autobackup. After you mount the control file, use the RMAN repository in the mounted control file to restore the datafiles.
When RMAN Performs Control File Autobackups
If CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN automatically backs up the control file and the current server parameter file (if used to start up the database) at the end of a successful BACKUP command. If the database runs in ARCHIVELOG level, RMAN makes control file autobackups when a structural change to the database affects the contents of the control file.Oracle论坛
https://community.oracle.com/thread/3553841
In addition to the last two types of automated control file backups, a special type of control file backup can be configured to occur as a direct result of database changes such as adding new tablespaces, adding datafiles, adding online redo logs, and so on. This type of automatic backup can only happen to disk. A special option of the configure controlfile autobackup command can be used to facilitate this backup. Here is an example:RMAN> configure controlfile autobackup format for device type disk to ‘d:\backup\contf\robt_%F’
When this option is used, the Oracle RDBMS will automatically back up the control file during database structure changes that impact the control file. These changes might include adding a new tablespace, altering the state of a tablespace or datafile (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, and so forth. Note that this automated backup can only be to disk, because tape is not supported. These backups can get a bit large (since the control file contains a history of many of the past backups), so make sure you allocate enough disk space to the backup directory. In spite of the additional space that will be required, these backups can be incredibly handy to have for recovery. Finally, be aware that if the backup fails for any reason, the database operation itself will not fail.