当前位置: 老葡京网站娱乐 > 数据库 > 其它数据库 > 正文

基于恢复目录的备份

时间:2013-11-06

老葡京网站娱乐 www.sdguanhua.com 1.查看相关信息

RMAN> list incarnation;

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

------- ------- -------- ---------------- --- ---------- ----------

1       8       ORCL     1260850162       PARENT  1          30-JUN-05

1       2       ORCL     1260850162       CURRENT 446075     22-OCT-10

----------------------------------------------------------------------------------------------------

RMAN> crosscheck copy;         --校验copy

RMAN> delete expired copy;     --删除过期的copy

2.全备

RMAN> run{

2> allocate channel ch1 device type disk;

3>  backup as compressed backupset

4> database plus archivelog delete input

5> format='/u01/app/oracle/bk/rmbk/Whole_%d_%U'

6>  tag='Whole_bak';

7> release channel ch1;}

3.增量备份(0级)

RMAN> run{

2> allocate channel ch1 device type disk;

3> allocate channel ch2 device type disk;

4> backup as compressed backupset

5> incremental level 0

6> database plus archivelog delete input

7> format='/u01/app/oracle/bk/rmbk/Inc_0_%d_%U'

8> tag='Inc_0';

9> release channel ch1;

10> release channel ch2;}  

RMAN> list backup summary;

4.增量备份(1级)

RMAN> run{                                  

2> allocate channel ch1 device type disk;

3> allocate channel ch2 device type disk;

4> backup as compressed backupset

5> incremental level 1 database

6> format='/u01/app/oracle/bk/rmbk/Inc_1_%d_%U'

7> tag='Inc_1';

8> release channel ch1;

9> release channel ch2;}

RMAN> list backup by file;