recovery manager backupcheck
Hej!Jeg har et par script der køre varm og kold backup til disk på vores database.
# Copyright (c) Oracle Corporation 1995, 1996, 1997. All Rights Reserved.
All Rights Reserved.
#
# NAME
# warm_backup_prod.rcv
#
# DESCRIPTION
# Example of how to perform a warm whole database backup
#
# NOTES
#
# MODIFIED (MM/DD/YY)
#
#
# The following example will shows how to make a warm backup
# using Recovery Manager.
#
# Note: The database must be in ARCHIVELOG mode
#
# The scenario assumes:
# o you are backing your database up to disk
# o you use password file to your database
#
# Run this script by:
# rman cmdfile warm_backup_prod.rcv
#
connect target sys/oracle@orcl
connect rcvcat rman/rman@rcat
run {
set maxcorrupt for datafile 6,7,8 to 20;
allocate channel t1 type disk;
backup
full
format '/dev2/backup/orcl_%t_%s_%p'
(database);
sql 'alter system archive log current';
backup
filesperset 40
format "/dev2/backup/orcl_arch_%d_%u"
(archivelog all)
archivelog until time 'sysdate-2' like '/dbs/admin/orcl/arch/%' channel t1 delete input;
release channel t1;
}
Og her kold backup af rcat databasen
# NAME
# cold_backup.rcv
#
# DESCRIPTION
# Example of how to perform a consistent whole database backup
#
# NOTES
#
# MODIFIED (MM/DD/YY)
#
#
# The following example will shows how to make a consistent backup
# (i.e. database closed cleanly) using Recovery Manager.
#
# Note: Oracle recommends you shutdown your database cleanly
# before performing a closed backup, that way the
# backup is consistent.
#
# The scenario assumes:
# o you are backing your database up to disk
# o you wish to include offline datafiles, and read-only tablespaces,
# in the backup
# o you want the backup to terminate if any files are not
# accessible
# o you want to open the database after the backup completes
#
# Recovery Manager requires the database to be shutdown clean, then
# started and mounted before you start a closed backup.
#
# Start up Server Manager, and:
#
# SVRMGR> connect internal
# SVRMGR> shutdown immediate
# SVRMGR> startup mount
#
# Run this script by:
# rman nocatalog cmdfile cold_backup.rcv
#
connect target
run {
allocate channel t1 type disk;
backup
incremental level 0
format '/dev2/backup/df_%t_%s_%p'
(database);
sql 'alter database open';
}
Som det er nu har jeg sat det op til at alt hvad der kører i oracle brugerens cron bliver mailet.
Jeg kunne godt tænke mig hvis man kunne lave et check i disse script der meldte tilbage hvis operationen er gået godt eller skidt.
Jeg er ikke en haj til dette her, men er der nogle der har et bud.
Takker