Backup Oracle database with RMAN: incremental hot backup scripts

No GoodNeed ImprovementOKGoodExcellent (7 votes, average: 4.43 out of 5)
Loading ... Loading ...

The following scripts were developed by me and being used by a federal contracting company for backing up Deltek Costpoint databases (Oracle 9i).

1, costpiont_rman_inc_backup.txt

run
{
CROSSCHECK BACKUP;
CROSSCHECK archivelog all;
CROSSCHECK COPY;
CROSSCHECK backup of database;
CROSSCHECK backup of controlfile;
delete noprompt obsolete;
#resync catalog;
DELETE noprompt backup completed before ’sysdate-7′;
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS;
# delete noprompt expired archivelog all;
}

run
{
allocate channel ch1 device type disk format ‘L:\Rman_backup\%d_%u_%s_%p’;
allocate channel ch2 device type disk format ‘L:\Rman_backup\%d_%u_%s_%p’;
# allocate channel ch3 device type disk format ‘L:\Rman_backup\%d_%u_%s_%p’;
# BACKUP INCREMENTAL LEVEL 1 cumulative tag = ‘Weekly incremental backup’ database include current controlfile;
backup incremental level 1 tag = ‘weekly_incremental_backup’ ( database setsize 15000000 filesperset 1 include current controlfile );
sql ‘alter system switch logfile’;
sql ‘alter system archive log current’;
# BACKUP filesperset 1 archivelog all tag =’archive_log’ delete input;
#BACKUP filesperset 1 archivelog all tag =’archive_log’;
BACKUP filesperset 20 archivelog all delete input;
# restore database validate;
release channel ch1;
release channel ch2;
# release channel ch3;
}
exit

2, costpoint_rman_inc_backup.bat

c:
cd C:\Oracle\job\rman_costpoint
rman catalog rmansiit/xxx@rman target sys/xxx@SIIT_18 cmdfile C:\oracle\job\rman_costpoint\costpiont_rman_inc_backup.txt log=C:\oracle\job\rman_costpoint_logs\%date:~10,4%_%date:~4,2%_%date:~7,2%_inc_log.txt

Popularity: 11%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word