RMAN backup status
Job details
Name: | RMAN backup status |
Platform: | Oracle |
Category: | Availability |
Description: | Checks the status of RMAN full backup from V$RMAN_BACKUP_JOB_DETAILS performance view for input_type ‘DB FULL‘. The procedure can also check incremental (input_type ‘DB INCR‘) level 0 backup (equivalent to full backup) by checking V$BACKUP_DATAFILE performance view (column INCREMENTAL_LEVEL=0). |
Long description: | Checks the status of RMAN full backup from V$RMAN_BACKUP_JOB_DETAILS performance view for input_type ‘DB FULL‘. The procedure can also check incremental (input_type ‘DB INCR‘) level 0 backup (equivalent to full backup) by checking V$BACKUP_DATAFILE performance view (column INCREMENTAL_LEVEL=0). |
Version: | 2.66 |
Default schedule: | 10 6 * * |
Requires engine install: | Yes |
Compatibility tag: | .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & _cdb_v_rman_backup_job_details = ‘1′ & is_pluggdb = ‘0′ ]/.[is_rds = ‘0′] |
Parameters
Name | Default value | Description |
---|---|---|
backup expire time | 168 | Backup expire time (in hours). If no valid backup exists within this time threshold a warning is returned. |
return status when backup RUNNING | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup status value is RUNNING. |
return status when backup FAILED | 2 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup status value is FAILED. |
check incremental level 0 | YES | If set to YES, the procedure checks for incremental level 0 backup if full backup (input_type = “DB FULL“) does not exists, or if the last full backup is running or failed. |
container ID | 1 | The ID of the container to which the data pertains. |
return status when OLD backup | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup is older than “backup expire time” parameter value. |
return status when backup NOT IMPLEMENTED | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when RMAN backup is not implemented. |
history threshold | 90 | The number of days the statistics are held in the dbwatch history table. |
min output/input bytes ratio | 95 | The minimum output/input bytes ratio for incremental backup (input_type = “DB INCR“) which indicates if this is a level 0 or level 1 incremental backup. If no RMAN backup information is found (input_type “DB FULL“ and “DB INCR“ level 0) in V$RMAN_BACKUP_JOB_DETAILS, V$BACKUP_DATAFILE and dbWatch history table, the procedure check output/input bytes ratio in V$RMAN_BACKUP_JOB_DETAILS. |
Job Summary
- Purpose: The purpose of this job is to monitor the status of RMAN backups, including full and incremental (level 0) backups.
- Why: Monitoring the RMAN backups ensures data integrity and availability by verifying that backups are occurring as scheduled and without errors. This helps in ensuring data can be restored in case of data loss or corruption.
- Detection of specific conditions:
- Checks for backups that have not been implemented.
- Identifies backups that have failed or are currently running.
- Ensures no backup is older than the specified threshold, which would indicate a failure in regular backup execution.
Details
- Database Compatibility: Oracle
- Tables Used: V$RMAN_BACKUP_JOB_DETAILS, V$BACKUP_DATAFILE, and others for tracking and logging.
- Job Functions:
- Checks backup status.
- Logs historical backup data.
- Validates various backup conditions like age, status (failed, running, etc.), and configuration.
Check Conditions and Notifications
- Checks if last backup is older than a specific “expiration” time.
- Returns a status based on the operational state of the backup: Running, Failed, or Not Implemented.
- Alerts based on different conditions (e.g., running, failed).
Implementation Specifics
- Tables Involved:
- rman_backup_histr: Stores historical data of RMAN backups.
- rman_backup_job_d_histr: Logs specific job details for backup.
- Procedures Used:
- rman_backup_status: Main procedure that checks the status and date of the last RMAN backup and logs the details.
- Scheduled Execution: Default job schedule at specific intervals ensures regular monitoring.
- Versioning: Handles different features and conditions based on the version of Oracle database and dbWatch.
Typical Use Case
- The job is used in environments where data safety is critical, and regular backups are essential for operational continuity and compliance with data protection standards.
- Particularly useful in large databases or environments with heavy transaction loads where backup failures can lead to significant data loss or service interruptions.
Maintenance and Checks
- Pre-Implementation Checks:
- Ensuring necessary privileges are granted.
- Validation of object existence to prevent runtime errors.
- Post-Implementation Tasks:
- Updates the parameters based on actual environment conditions like container ID after the task execution.
- Upgrade Path: Handles transitions between different versions of the job by adjusting parameters, descriptions, and functionalities according to the version changes.
Additional Metadata
- Category: Availability
- This job is part of regular database health checks aimed at ensuring the database can recover from physical and logical failures, preserving the integrity and availability of data.