rman b14193Backup and Recovery Quick Start Guide筆記

polestar123發表於2009-04-13
b14193Backup and Recovery Quick Start Guide.pdf

總結:rman repository記錄在control file中或者catalog中

1、幾個概念:backup>backupset>backuppiece

2、report need backup;

3、list backup summary

list backup by backup

list backup by file

4、

crosscheck backup;

crosscheck copy;

delete obsolete;

delete expired backup;

delete backup;

5、configure EXCLUDE FOR TABLESPACE oratab; (不備份oratab表空間)

6、CONFIGURE RETENTION POLICY TO REDUNDANCY 2;(設定冗餘策略)

7、指令碼

RMAN> @/home/oracle/oracle/product/10.2.0/rman_back.txt

[oracle@oracle 10.2.0]$ more rman_back.txt
list backup;
delete noprompt backup;
backup database;
[oracle@oracle 10.2.0]$

8、backup datafile 1,3;

backup tablespace oratab,system;

9、恢復datafile

RMAN> SQL 'ALTER DATABASE DATAFILE 7 OFFLINE';
RMAN> RESTORE DATAFILE 7;
RMAN> RECOVER DATAFILE 7;
RMAN> SQL 'ALTER DATABASE DATAFILE 7 ONLINE';

10、恢復tablespace

RMAN> SQL 'ALTER TABLESPACE users OFFLINE';
RMAN> RESTORE TABLESPACE users;
RMAN> RECOVER TABLESPACE users;
RMAN> SQL 'ALTER TABLESPACE users ONLINE';

11、恢復database

RMAN> STARTUP FORCE MOUNT;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN;

總結:

下載oracle 官方文件,邊看文件邊做練習,概念和實際相結合,記得牢固。

[@more@]n

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70612/viewspace-1020439/,如需轉載,請註明出處,否則將追究法律責任。

相關文章