僅供參考使用,非Oracle DBA。

目前只有驗證備份正常,但是還原時不確有無其他影響(未實際驗證)。

 

狀況說明:

因DB中有建立【測試環境專用的表格空間】,避免RMAN備份時間太久及佔用磁碟空間,故備份時想排除該環境的資料。
查看Oracle EM的【備份設定值】下已有此功能,直接UI畫面中操作即可~

關鍵字:

Tablespaces Excluded From Whole Database Backup
Populate this table with the tablespaces you want to exclude from a whole database backup. Use the Add button to add tablespaces to this table.

 

其他參考文章:

http://sparjandba.blogspot.com/2014/10/exclude-tablespace-from-rman-full-backup.html

 

引用文章:

Configuring Tablespaces for Exclusion from Whole Database Backups:

In some cases you may want to exclude specified tablespace part of the regular backup schedule, as in these cases:
  • A tablespace is easy to rebuild, so it is more cost-effective to rebuild it than back it up every day.
  • A tablespace contains temporary or test data that you do not need to back up.
  • A tablespace does not change often and therefore should be backed up on a different schedule from other backups.
 
You can run CONFIGURE EXCLUDE FOR TABLESPACE to exclude the specified tablespace from the BACKUP DATABASE command. The exclusion condition applies to any datafiles that you add to this tablespace in the future.
 
For example, you can exclude testing tablespaces users and example from whole database backups as follows:
  • RMAN> CONFIGURE EXCLUDE FOR TABLESPACE users ;
  • RMAN> CONFIGURE EXCLUDE FOR TABLESPACE example;
If you run the following command, then RMAN backs up all tablespaces in the database except users  and example:
  • RMAN> BACKUP DATABASE;
You can still back up the configured tablespaces by explicitly specifying them in a BACKUP command or by specifying the NOEXCLUDE option on a BACKUP DATABASE command. For example, you can enter one of the following commands:
 
# backs up the whole database, including users and example
  • RMAN> BACKUP DATABASE NOEXCLUDE;
  • RMAN> BACKUP TABLESPACE users, example;  # backs up only users and example
You can disable the exclusion feature for users and example as follows:
  • RMAN> CONFIGURE EXCLUDE FOR TABLESPACE users CLEAR;
  • RMAN> CONFIGURE EXCLUDE FOR TABLESPACE example CLEAR;
RMAN includes these tablespaces in future whole database backups.

Command to backup READONLY and OFFLINE tablespaces:-

RMAN>BACKUP DATABASE SKIP READONLY, SKIP OFFLINE;
arrow
arrow
    全站熱搜

    Nathan 發表在 痞客邦 留言(0) 人氣()