RMAN Backup Scripts

  • Weekly Full Compressed Backup Script

$cat weekly.sh
su – oracle -c “/u01/app/oracle/product/10.2.0/db_1/bin/rman target user/pass@connect_string catalog user/pass@connect_string CMDFILE <Path To Command File> log /tmp/rman_full_backup_db_`date ‘+%F_%H:%M:%S’`.log”
if [ $? -ne 0 ]; then
Define your action here
fi

$ cat weekly.rcv
RUN
{
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 TAG = ‘WEEKLY’ DATABASE PLUS ARCHIVELOG ;
}
exit;

  • Daily Incremental Compress Backup Script

$cat daily.sh
su – oracle -c “/u01/app/oracle/product/10.2.0/db_1/bin/rman target user/pass@connect_string catalog user/pass@connect_string CMDFILE <Path To Command File> log /tmp/rman_incremental_backup_db_`date ‘+%F_%H:%M:%S’`.log”
if [ $? -ne 0 ]; then
Define your action here
fi

$cat daily.rcv
RUN
{
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 1 TAG = ‘DAILY’ DATABASE PLUS ARCHIVELOG ;

}

exit;

There are currently no comments highlighted.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>