Database backup
Job details
Name: |
Database backup |
Platform: |
Sybase |
Category: |
Availability |
Description: |
Checks backup status of all databases. |
Long description: |
Checks backup status of all databases. |
Version: |
1.3 |
Default schedule: |
20,50 * * * |
Requires engine install: |
Yes |
Compatibility tag: |
.[type=‘instance’ & databasetype=‘sybase’]/instance[maj_version > ‘14′ & hasengine=‘YES’] |
Parameters
Name |
Default value |
Description |
ignore databases |
tempdb |
List of databases (separated by comma) which will be ignored. You can use % (percent sign) to represent wild card characters. |
backup in progress status |
1 |
Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database backup is in progress. |
backup failed status |
1 |
Return status value (ALARM – 2, WARNING – 1, or OK – 0) when database backup failed. |
missing backup status |
1 |
Return status value (ALARM – 2, WARNING – 1, or OK – 0) when there is no database backup information (column BackupStartTime is null). |
warning threshold |
48 |
A warning is triggered if the amount of hours, since the database have been backed up, |
alarm threshold |
240 |
An alarm is triggered if the amount of hours, since the database have been backed up, |
Job Summary
- Purpose: The monitoring job for dbWatch Control Center is designed to check the backup status of all databases to ensure data safety and quick recovery in case of data loss.
- Why: Monitoring the backup status is crucial for maintaining data integrity and availability. It helps in identifying backups that are in progress, have failed, or are missing, which are vital for disaster recovery planning. This job also provides alerts based on defined warning and alarm thresholds, facilitating proactive database management.
- Manual checking: For manual verification of backup status, use the following SQL commands:
select DBName, BackupStartTime, LastCheckpointTime, LastTranLogDumpTime from master..monOpenDatabases
h2. Technical Implementation
- “Database backup status check”: Implemented via a stored procedure that evaluates backup status against several criteria: in progress, failed, or missing. It also checks if the backups are older than specified warning or alarm thresholds.
- “Result Handling”: The job adjusts the response code based on the severity of the findings (OK, WARNING, ALARM) and provides a detailed message indicating the specific issues and the databases affected.
- “Database Interaction”: The procedure interacts with historical backup data stored in a custom table and system views to ascertain backup details.
- “Exclusions and Thresholds”: Specific databases can be excluded from checks, and the thresholds for triggering warnings and alarms are configurable.
Schedule and Dependencies
- The job is scheduled to run at specific intervals, typically every half-hour, ensuring timely detection of backup issues.
- Dependencies include stored procedures and historical data tables used to track backup statuses. These must be correctly set up and maintained for the job to function properly.
Reporting
- The job reports include detailed tables showing backup start times, last transaction log dump times, and other relevant information categorized by database. These reports aid in a comprehensive view of the backup landscape.
- Specific reports are generated for:
- Databases with complete backup details
- Databases with missing backups
- Historical backup frequency and dates
Cleanup and Maintenance
- The job includes mechanisms to clean up historical data that is older than set thresholds to prevent unnecessary data accumulation.
- On job failure, unnecessary procedures and tables are cleaned up to maintain system cleanliness and ensure that retries occur in a clean state.
Enhancements and Upgradability
- The job design allows for easy updates and modifications to accommodate changes in backup strategies or adjustments in threshold settings.
- Over time, enhancements may include more granular backup status checks or integration with additional backup technologies.
The technical implementation and robust reporting capabilities make this monitoring job a critical component of database administration in dbWatch Control Center, ensuring data safety and system reliability.