查看数据库是否是归档模式
archive log list;
2、将数据库更改为归档模式
alter database archivelog
3、数据库全备份
backup database
4、查看备份信息
list backup
5、备份等级含义: 0级:全备份 1级:差异增量 2级:累积增量
6、备份脚本:
全备份 0 级:
export ORACLE_BASE=D:apporacle
export ORACLE_HOME=D:apporacleproduct11.2.0dbhome_1
export ORACLE_SID=ecology
export PATH=$ORACLE_HOME/bin:$PATH
rman target / <
allocate channel c1 type disk;
backup incremental level 0 tag "db0" format "D:akdb0_%d_%T_%s" database include current controlfile;
delete noprompt obsolete;
release channel c1;
}
增量备份 1级:差异增量
export ORACLE_BASE=D:apporacle
export ORACLE_HOME=D:apporacleproduct11.2.0dbhome_1
export ORACLE_SID=ecology
export PATH=$ORACLE_HOME/bin:$PATH
rman target / <
allocate channel c1 type disk;
backup incremental level 1 tag "db1" format "D:akdb1_%d_%T_%s" database include current controlfile;
delete noprompt obsolete;
release channel c1;
}