General
cancel
Showing results for 
Search instead for 
Did you mean: 

RMAN backup database plus archivelog - format

Ratzie
Super Advisor

RMAN backup database plus archivelog - format

I am trying to set up rman scripts to backup oracle 10.2.0.2 database.

I can simply use:
backup database plus archivelog

Can I add: format '/dbbackups_odb/%T_archivelog_%d_%e_%u';
before the PLUS ARCHIVELOG, I also want to set a tag.

But I want to format the files better.
I can set the backup format, but how do I format the archivelogs:

case "$DAY" in
"Sun")
rman target / msglog $ORACLE_LOGS/online_BACKUP_level0_${DATE}.log <
crosscheck BACKUP;
run {
allocate channel BACKUP_disk1 type disk format '/dbbackups_odb/%T_online_bu_level0_sun_%d_%U';
BACKUP as COMPRESSED BACKUPSET INCREMENTAL LEVEL=0 DATABASE tag 'ONLINE_BU_COMPRESSED_LEVEL0_SUN'
PLUS ARCHIVELOG all not backed up;

delete noprompt obsolete device type disk;
delete noprompt expired BACKUP;
release channel BACKUP_disk1;
}
exit;
EOF
1 REPLY
Ratzie
Super Advisor

Re: RMAN backup database plus archivelog - format

rman target / msglog $ORACLE_LOGS/online_backup_level0_${DATE}.log <crosscheck backup;
run {
allocate channel backup_disk1 type disk;
backup as COMPRESSED BACKUPSET
INCREMENTAL LEVEL=0 DATABASE
TAG 'ONLINE_BU_COMPRESSED_LEVEL0_SUN'
format '/dbbackups_odb/%T_online_bu_level0_sun_%d_%U.bak'
PLUS ARCHIVELOG
format '/dbbackups_odb/%T_archivelog_%d_%e_%U.bak'
tag 'ARCHIVELOG_BU_COMPRESSED';

delete noprompt obsolete device type disk;
delete noprompt expired backup;
release channel backup_disk1;
}
exit;