#!/bin/bashif [ $1 ]thenbackup_level=$1elsebackup_level=0fibackup_user=sysbackup_user_pw=oracle#catalog_user=rman#catalog_user_pw=rmanlog_file=/oracle/admin/$ORACLE_SID/rman_backup.logecho "Beginning rman backup ...">$log_filedata>>$log_filerman target $backup_user/$backup_user_pw <$log_file# catalog $catalog_user/$catalog_user_pw@rmanbackup incremental level=$backup_level database ;quit;EOFecho "rman backup finished">>$log_filedata>>$log_file