ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RMAN--backup command

RMAN--backup command

原创 Linux操作系统 作者:vongates 时间:2019-07-16 14:33:02 0 删除 编辑

-----------------------------------------------------------------------
*** rman backup command ***
-----------------------------------------------------------------------


詳細說明

------------------------
--backup [database|tablespace|datafile|archive]
 device type [disk|sbt]
 format='d:rmandbdb_%U'
 tag='db20041208'
 maxsetsize=100m
 copies=2
 include current controlfile
 keep [forever|until time='sysdae+180']
 [skip [readonly|offline|inaccesible]|skip readonly skip offline skip inaccesible]
 noexclude;

-----------------------------------------------------------------------
--backup database e.g.
-----------------------------
1. backup database;
2. backup database plus archivelog;
3. backup database plus archivelog delete input;
4. backup database plus archivelog delete all input;
5. backup database
------------------------------------------------------------------------
--backup tablesapce e.g.
------------------------------
1. backup tablespace users;
2. backup tablespace users plus archivelog;
3. backup tablespace users include current controlfile plus archivelog;

------------------------------------------------------------------------
--backup datafile e.g.
---------------------------
1. backup datafile 2;
2. backup datafile 'e:oracleoradatausers01.dbf';
3. backup datafile 'e:oracleoradatausers01.dbf' plus archivelog;
-----------------------------------------------------------------------
--backup archivelog e.g.
-------------------------
1. backup archivelog all;
2. backup archivelog from time 'sysdate-3'
3. backup archivelog from sequence 345;
4. backup archivelog all delete input;
5. backup archivelog from time 'sysdate-3' delete input;
6. backup archivelog not backed up 3 times;
7. backup archivelog all delete input until time 'sysdate-2';
----------------------------------------------------------------------
--backup controlfile and spfile e.g.
--------------------------------------
1. backup current controlfile;
2. backup spfile;
3. sql "alter database backup controlfile to "e:rmancontrolcontrolf.bak" ";
   backup controlfilecopy 'e:rmancontrolcontrolf.bak';
----------------------------------------------------------------------------
--backup backupset e.g.
------------------------------
1. backup backupset all;
2. backup backupset completed before 'sysdate-2';
3. backup backupset completed before 'sysdate-2' delete input;
4. backup backupset completed after 'sysdate-2' delete input;
5. backup backupset all
 format='e:rmanbackupset_%U.bak'
 tag='backup of backupset'
 channel 'ORA_DISK_1';
-----------------------------------------------------------------
--other backup e.g.
--------------------
1. backup validate database;       --檢查數據庫的錯誤(包含物理和邏輯)但不備份
2. backup database force;       --強制備份只讀的數據文件
3. backup database not backed up [since time='sysdate-2'];   --備份最近[兩天]沒有備份過的數據文件
4. backup check logical database;       --檢查邏輯錯誤的同時備份數據庫
5. backup validate check logical database;      --檢查邏輯錯誤但不備份數據庫
6. backup database skip [readonly|offline|inaccessible];   --跳過只讀|不在線|不能讀取(實際不存在)的文件

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51626/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    291793