Originally posted by farienzo
run {
allocate channel ch_disk type disk format '/usr/local/orabackup/dbflotte/b_%u_%s_%p';
backup
( database include current controlfile );
backup ( archivelog all delete input );
}
Code:
run {
#
# Full DB backup
#
allocate channel ch_disk1 type disk;
backup
full
tag backup_db_full
filesperset 5
format '/usr/local/orabackup/dbflotte/b_%u_%s_%p';
(database include current controlfile);
release channel ch_disk1;
#
# Archive the current log
#
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
#
# Backup and delete all your archive logs
#
allocate channel ch_disk1 type disk;
allocate channel ch_disk2 type disk;
backup
filesperset 20
format '/usr/local/orabackup/dbflotte/arch_%d_t%t_s%s_p%p'
archivelog all
delete input;
release channel ch_disk1;
release channel ch_disk2;
}
Hope this would help you.
Thanx
Sam
Life is a journey, not a destination!