Oracle Rman 备份命令超详解释

WBOY
풀어 주다: 2016-06-07 17:40:59
원래의
820명이 탐색했습니다.

一、list常用命令总结备忘list命令列出控制文件、RMAN恢复目录中备份信息,是我们对所有可见的数据库备份文件的一个最直观的了解的方法listincarnation;&..

 

一、list常用命令总结备忘

    list incarnation;

    list backup summary;

    list backup of database summary;

    list backup of tablespace summary;

    list backup of datafile n,n summary;

    list archivelog all summary;

    list archivelog all;

 

    list backup by file;

    list backup;

    list expired backup;

    list copy;

 

    list backup of spfile;

    list backup of controlfile;

    list backup datafile n,n,n;

    list backup tablespace tablespace_name;

    list backup of archivelog all;

    list backup of archivelog from scn ...;

    list backup of archivelog until scn ...;

    list backup of archivelog from sequence ..;

    list backup of archivelog until time 'sysdate-10';

    list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until};

 

1.List 当前RMAN所备份的数据库:

   RMAN> list incarnation;

    1.1. list backup summary; --概述可用的备份

        这个命令可以派生出很多类似命令,例如

        list backup of database summary

        list backup of archivelog all summary

        list backup of tablespace users summary;

        list backup of datafile n,n,n summary

    这些命令可以让我们对已有的备份文件有一个整体,直观的了解。

    1.2.list backup by file;--按照文件类型分别列出

    1.3.list backup;

    这个命令列出已有备份集的详细信息。

    1.4.list expired backup;

    列出过期的备份文件

    1.5.list copy;

    list copy of database;

    list copy of controlfile;

    list copy of tablespace users;

    list copy of datafile n,n,n;

    list copy of archivelog all;

    list copy of archivelog from scn 10000;

    list copy of archivelog until sequence 12;

 

2.List 相关文件的信息

    list backup of {archivelog, controlfile, database, datafile, spfile, tablespace};

    list backup of database; --full,incremental,tablespace,datafile

    list backup of spfile;

2.2 控制文件:

    list backup of controlfile;

2.3 数据文件:

    list backup of datafle n,n,n,n;

2.4表空间:

2.5归档日志:

    list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until};

    list backup of archivelog all;

    list backup of archivelog until time 'sysdate-1';

    list backup of archivelog from sequence 10;

    list backup of archivelog until sequence 10;

    list backup of archivelog from scn 10000;

    list backup of archivelog until scn 200000;

 

    list archivelog from scn 1000;

    list archivelog until scn 2000;

    list archivelog from sequence 10;

    list archivelog until sequence 12;

二、report常用命令总结备忘

report用于判断数据库当前可恢复状态、以及数据库已有备份的信息。

最常使用的是report obsolete; report schema;

report {device, need, obsolete, schema, unrecoverable}

report schema;

report obsolete;

report unrecoverable;

report need backup;

report need backup recovery window of 2 days;

    2.1.report schema;

    报告数据库模式

    22.report obsolete;

    2.3.report unrecoverable;

    2.4.report need backup;

        report need backup days=3;

        report need backup incremental=3;

        report need backup redundancy=3;

        report need backup recovery window of 2 days;

三、backup常用命令总结备忘

    1.设置备份标记

        backup database tag='full_bak1';

        注:每个标记必须唯一,相同的标记可以用于多个备份只还原最新的备份。

        backup database maxsetsize=100m tag='datafile1';

      RMAN-06183: datafile or datafile copy larger than MAXSETSIZE: file# 1 /data/oradata/system01.dbf

        run {

        allocate channel c1 type disk maxpicecsize 100m format '/data/backup/full_0_%U_%T';

        backup database tag='full_0';

        release channel c1;

        }

        Configure channel device type disk maxpiecesize 100 m;

        configure channel device type disk clear;

    4.备份集的保存策略

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿