分类: Oracle
2009-05-15 17:53:41
全库备份脚本
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup full tag ‘dbfull’ format ‘/u01/oradata/backup/full%u_%s_%p’ database
include current controlfile;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input; #备份归档可选,可以单独定期备份
release channel c1;
release channel c2;
release channel c3;
}
零级备份脚本
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 0 tag ‘db0’ format ‘/u01/oradata/backup/db0%u_%s_%p’
database skip readonly;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input; #备份归档可选,可以单独定期备份
release channel c1;
release channel c2;
release channel c3;
}
一级备份脚本
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 1 tag ‘db1’ format ‘/u01/oradata/backup/db1%u_%s_%p’
database skip readonly;
sql ‘alter system archive log current’;
backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
archivelog all delete input; #备份归档可选,可以单独定期备份
release channel c1;
release channel c2;
release channel c3;
}