0级全库copy
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup as copy incremental level 0 database TAG '20221001' format '+NEWDATADG';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
1级增量备份recover
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup incremental level 1 format '+NEWDATADG' for recover of copy with tag '20221001' database;
recover copy of database with tag '20221001';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
停机mount状态下
做1级备份和reover
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup incremental level 1 format '+NEWDATADG' for recover of copy with tag '20221001' database;
recover copy of database with tag '20221001';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
切换数据文件
switch database to copy;
recover database;
alter database open;
切换完成