RMAN备份/恢复
RMAN备份是指使用Recovery Manager备份数据文件、控制文件、归档日志和SPFILE的方法。并且因为RMAN备份是由Target Database的服务
RMAN备份是指使用Recovery Manager备份数据文件、控制文件、归档日志和SPFILE的方法。
并且因为RMAN备份是由Target Database的服务器进程来完成,所以当使用RMAN执行备份操作时,Target Database必须处于MOUNT或OPEN状态。
当使用RMAN执行备份操作时,必须分配通道,并且RMAN备份是由通道所对应的服务器进程来完成的。
3.1Create Backup Set
Database(Full)Backup Set
RMAN>backupdatabaseformat = ‘/home/Oracle/rman/’;
Tablespace Backup Set
RMAN>backuptablespace[name] format= ‘/home/oracle/rman/%n_%s.bak’;
Datafile Backup Set
RMAN>backupdatafile[n] format= ‘/home/oracle/rman/’;
Controlfile Backup Set
RMAN>backupcurrent controlfileformat= ‘/home/oracle/rman/%d_%s.ctl’;
e.g. [include current controlfile];
SPFILE Backup Set
RMAN>backupspfileformat='/home/oracle/rman/%d_%s.ora';
Archivelog Backup Set
RMAN>backup format='/home/oracle/rman/%d_%s.arc'
2>archivelogfrom time='sysdate-1' until time='sysdate';
RMAN>run{
2>allocate channel c1 type disk;
3>sql 'alter system archive log current';
4>backup archivelog all
5>format='/home/oracle/rman/arch_%d_%s_%p_%t';
6>}
e.g. [plus archivelog];
RMAN> list backupset of archivelog all;
Parallelization Backup Set
Duplexed Backup Sets
RMAN>backup copies [n]tablespace[name]
2>format= ‘/u01/bak1/%N_%s.dbf’,’/u01/bak2/%N_%s.dbf’,
3>’/u01/bak3/%N_%s.dbf’;
RMAN> backup backupset [n] format = ‘/u01/bak1/%N_%s.dbf’;
RMAN> configure channel device type [name]
2> maxpiecesize 4G;
RMAN> backup device type [name] format ‘’
,上一篇: RAC之GRD和PCM lock简介