1.备份单个pdb
run { allocate channel ch1 device type disk; allocate channel ch2 device type disk; allocate channel ch3 device type disk; backup as compressed backupset full filesperset 10 pluggable database pdb1 format '/u01/rmanbak/pdbbak/pdb1_fullbk_%d_%s_%u_%T.bak'; sql 'alter system archive log current'; backup as compressed backupset archivelog all format '/u01/rmanbak/pdbbak/daily_arch_%d_%s_%u_%T.bak' delete input; backup current controlfile format '/u01/rmanbak/pdbbak/daily_ctl_%d_%s_%u_%T.bak'; backup spfile format '/u01/rmanbak/pdbbak/daily_spfile_%d_%s_%u_%T.bak'; release channel ch1; release channel ch2; release channel ch3; crosscheck backup; crosscheck archivelog all; delete noprompt expired backup; delete noprompt obsolete; }
2.备份多个pdb
run { allocate channel ch1 device type disk; allocate channel ch2 device type disk; allocate channel ch3 device type disk; backup as compressed backupset full filesperset 10 pluggable database pdb1,pdb2 format '/u01/rmanbak/pdbbak/pdb1_pdb2_fullbk_%d_%s_%u_%T.bak'; sql 'alter system archive log current'; backup as compressed backupset archivelog all format '/u01/rmanbak/pdbbak/daily_arch_%d_%s_%u_%T.bak' delete input; backup current controlfile format '/u01/rmanbak/pdbbak/daily_ctl_%d_%s_%u_%T.bak'; backup spfile format '/u01/rmanbak/pdbbak/daily_spfile_%d_%s_%u_%T.bak'; release channel ch1; release channel ch2; release channel ch3; crosscheck backup; crosscheck archivelog all; delete noprompt expired backup; delete noprompt obsolete; }
标签:format,恢复,备份,pdbbak,rmanbak,_%,backup,pdb,channel From: https://www.cnblogs.com/hxlasky/p/17308782.html