52.RMAN备份的创建和维护

1.创建RMAN备份

 

 

2.创建RMAN备份的演示

--备份参数文件
backup spfile
backup spfile format '/u01/spfilebak.bmp'
backup spfile format '+db/spfile.ora'

--备份控制文件
backup current controlfile;
backup current controlfile ofrmat '....';
backup as copy current controlfile;

--自动控制文件备份
backup database;
backup full database;
list backup of controlfile;
list copy of controlfile;

--数据文件备份
--表空间备份
backup tablesapce users,example;
backup tablespace system;

--数据文件备份
backup datafile 2,3;
backup datafile 4;
backup datafile '/oradata/orcl10g/xxx';
backup as copy datafile 4;
backup as copy tablespace users;

--所有数据文件
backup database;
backup full database;
包含所有的datafile,current,controlfile,spfile
backup database format '...%U...';

--备份归档日志
backup archive log all;
backup archive log all delete input;

--备份所有数据文件,控制文件,参数文件,归档日志备份
backup database plus archivelog;
backup database plus archivelog delete inpu;
backup full database plus archivelog;
backup full database plus archivelog delete inpu;

--备份快速恢复区
backup recovery;

--增量备份
backup incremantal level 0 database;

--cumulative:累积增量备份
--incremental:差异增量备份呢
backup cumulative incremental level 0|1|2|3|4 database datafile <> format '...';
backup increment level 0|1|2|3|4 cumulative database | datafile <> tablespace <> fromat '...';
--差异:上次增量以来变化数据库
--累积:从零级别以来变化数据库

--块跟踪
alter database enable block change tracking using file '/oradata/a.txt';

 

posted @ 2023-03-05 14:51  竹蜻蜓vYv  阅读(19)  评论(0编辑  收藏  举报