dmk_backup_report.{ksh|ps1}

This chapter presents the Backup Report wrapper script dmk_backup_report{ksh|ps1}.

All scripts have a detailed synopsis please check the option “-h” or “--help”.

The execution of dmk_backup_report.{ksh|ps1} requires a configuration file, which contains the needed parameters detailed later in this chapter. A template of the configuration file, named report.cfg, is stored in the subfolders template from DMK_DBBACKUP environment.

⚠️Using dmk_backup_report script is only possible when a catalog is implemented and in use.

Example:

  • To launch the backup report from linux platform:

oracle@vmdmkdbboradg1:/home/oracle/ [rdbms12201] dmk_backup_report.ksh -c
/u01/app/oracle/local/dmk_dbbackup/templates/report.cfg
2020-07-27_11-05-43::dmk_backup_report.pl::MainProgram ::INFO ==>
Configfile : /u01/app/oracle/local/dmk_dbbackup/templates/report.cfg
2020-07-27_11-05-43::dmk_backup_report.pl::MainProgram ::INFO ==> sqlplus
log file : /u01/app/oracle/local/dmk/log/2020-07-27_11-05-
43_dmk_backup_report.log
2020-07-27_11-05-43::dmk_backup_report.pl::MainProgram ::INFO ==> Catalog
connection : CAT/manager@DBCAT18C
2020-07-27_11-05-44::dmk_backup_report.pl::MainProgram ::INFO ==> HTML File
to be sent by email : /u01/app/oracle/local/dmk/log/2020-07-27_11-05-
43_dmk_backup_report.html
  • To launch the backup report from windows platform using powershell :

Administrator@WIN-KLICHMDL0LN:C:\\\\ [rdbms122] dmk_backup_report.ps1 -c
C:\\app\\oracle\\local\\dmk_dbbackup\\templates\\report.cfg
2020-07-27_11-10-52::dmk_backup_report.pl::MainProgram ::INFO ==>
Configfile : C:\\app\\oracle\\local\\dmk_dbbackup\\templates\\report.cfg
2020-07-27_11-10-53::dmk_backup_report.pl::MainProgram ::INFO ==> sqlplus
log file : C:\\app\\oracle\\local\\dmk/log/2020-07-27_11-10-
52_dmk_backup_report.log
2020-07-27_11-10-53::dmk_backup_report.pl::MainProgram ::INFO ==> Catalog
connection : CAT/manager@DBCAT18C
2020-07-27_11-10-54::dmk_backup_report.pl::MainProgram ::INFO ==> HTML File
to be sent by email : C:\\app\\oracle\\local\\dmk/log/2020-07-27_11-10-
52_dmk_backup_report.html
2020-07-27_11:10:56::dmk_backup_report.ps1::MainProgram::INFO ==> CleanExit
[0] code

Please note that :

powershell.exe –noprofile \\
–command "dmk_dtpump.ps1 –s ${ORACLE_SID} –-export"
The PowerShell profile is similar to the Unix/Linux user profile (~/.profile, ~/.bash_profile). The “-noprofile” option bypass the sourcing of the user profile.

The report will be generated as a HTML file which will be sent by email. The report will display for each database stored in the catalog the gap for the last successful full backup, inc0 backup, inc1 backup and archive log backup. If the gap is greater than the expected threshold provided in the configuration file, the result will be displayed in red color. Otherwise the backup will be considered as ok and displayed in green color.

Parameters

A hyphen character prefixes the command line parameters as they are be used within a shell.

–h or -–help

Display the Synopsis.

–v or -–ver

Display the version.

–c or –-configfile

Provide as argument the configuration file to be used. This configuration file is mandatory and will store all needed parameters as detailed in the next chapter.

dmk_backup_report.ksh -c <path to the configuration file>

Parameter configuration file

The configuration file will include several parameters to be used.

Catalog

Provides the connection string information to establish a connection to the catalog.

#*************************************************************
#RMAN Catalog
catalog=user/pwd@<CATALOG_SID>

alarm_threshold_full

Define alarm threshold for full backup in number of days.

#*************************************************************
# alarm_threshold_full
# Define alarm threshold for full backup
alarm_threshold_full=99

alarm_threshold_inc0

Define alarm threshold for inc0 backup in number of days.

#*************************************************************
# alarm_threshold_full
# Define alarm threshold for full backup
alarm_threshold_full=99

alarm_threshold_inc1

Define alarm threshold for inc1 backup in number of days.

#*************************************************************
# alarm_threshold_inc1
# Define alarm threshold for inc1 backup
alarm_threshold_inc1=1

alarm_threshold_arch

Define alarm threshold for archive log backup in number of days.

#*************************************************************
# alarm_threshold_arch
# Define alarm threshold for archive log backup
alarm_threshold_arch=0.5

Customer

Define customer name used to customize the report and the email sending.

#*************************************************************
# Name/ShortName of the customer
# Default is : "dbi-services"
Customer="dbi-services-Ltd"

MailRecipients

Define the list of destination email addresses.

#*************************************************************
# MailRecipients
# comma separated list of mail recipients
# Default is : "" - empty
MailRecipients=""

SmtpServer

Define the smtp server to be used to send the email.

#*************************************************************
# SmtpServer
# Infrastructure SMTP server
# Default is : "" - localhost
SmtpServer=""

MailFrom

Define the email sender address.

#*************************************************************
# MailFrom
# Hardcode address From sender
# Default is : "" - ${USERNAME}.${HOSTNAME}@${DOMAIN}
MailFrom="$ENV{USERNAME}.$ENV{HOST}@domain.com"

Last updated