Summary
This blog post outlines how to design and implement an RMAN Level 0 and Level 1 incremental backup plan in Oracle 19c, covering configuration, automation, validation, and maintenance for reliable database recovery.
Table of contents
Introduction
In today’s data-driven enterprise environments, database reliability and recoverability are non-negotiable. Oracle Recovery Manager (RMAN) remains one of the most powerful tools for safeguarding critical data against loss or corruption. In this post, we’ll explore how to design and implement a Level 0 and Level 1 RMAN backup strategy in Oracle 19c, complete with scheduling examples, validation steps, and cleanup routines. Whether you’re fine-tuning your backup policy or setting up a new environment, this guide provides the hands-on approach needed to ensure your Oracle databases remain recoverable and resilient.
Key Aspects of RMAN Backup Strategy
1. Understanding RMAN Incremental Backup Levels
Oracle Recovery Manager (RMAN) supports incremental backups, which capture only the data blocks that have changed since a previous backup.
- Level 0 Backup: The base backup. Equivalent to a full backup of the entire database.
- Level 1 Backup: Captures only blocks changed since the last Level 0 or Level 1 backup.
This structure reduces backup time and storage while maintaining recoverability.
| Backup Type | Description | Frequency (Recommended) |
|---|---|---|
| Level 0 | Full baseline backup | Weekly |
| Level 1 Differential | Changes since last Level 0 or 1 | Daily |
| Archivelog Backup | Redo logs for point-in-time recovery | Hourly or after heavy transactions |
2. Setting Up RMAN Environment
Before implementing your backup plan, ensure:
a) Database is in ARCHIVELOG mode:
ARCHIVE LOG LIST;
b) Flash recovery area (FRA) or backup destination is configured:
SHOW PARAMETER db_recovery_file_dest;
c) Set the backup format and location:
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/%d_%T_%U.bkp';
d) Set Retention Policy:
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
3. Sample RMAN Backup Scripts
a) Level 0 Backup Script
rman target / <<EOF
RUN {
CROSSCHECK BACKUP;
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 0 DATABASE TAG 'WEEKLY_L0';
BACKUP ARCHIVELOG ALL DELETE INPUT;
DELETE NOPROMPT OBSOLETE;
}
EOF
b) Level 1 Backup Script
rman target / <<EOF
RUN {
CROSSCHECK BACKUP;
BACKUP AS COMPRESSED BACKUPSET INCREMENTAL LEVEL 1 DATABASE TAG 'DAILY_L1';
BACKUP ARCHIVELOG ALL DELETE INPUT;
DELETE NOPROMPT OBSOLETE;
}
EOF
4. Automating RMAN Backups
a) On Linux (Crontab)
# Edit cron job with:
crontab -e
# Add the following entries:
0 2 * * 0 /path to/scripts/rman_level0.sh > / path to/logs/rman_level0.log 2>&1
0 2 * * 1-6 / path to/scripts/rman_level1.sh > / path to /logs/rman_level1.log 2>&1
This schedules a Level 0 backup every Sunday and Level 1 backups Monday through Saturday at 2 AM.
b) Archivelog Cleanup
Over time, archivelogs can consume large storage volumes. Add this to your backup script:
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-2';
5. Verifying and Validating Backups
a) Validate Backup Integrity
rman target /
RMAN> VALIDATE DATABASE;
b) Restore Validation
RMAN> RESTORE DATABASE VALIDATE;
This checks if all backup pieces required for restore are available and readable.
c) List and Crosscheck
MAN> LIST BACKUP SUMMARY;
RMAN> CROSSCHECK BACKUP;
6. Monitoring and Maintenance
a) Check Backup Status
SELECT SESSION_KEY, INPUT_TYPE, STATUS, START_TIME, END_TIME
FROM V$RMAN_BACKUP_JOB_DETAILS
ORDER BY START_TIME DESC;
b) Check Backup Size
ELECT INPUT_TYPE, SUM(INPUT_BYTES/1024/1024) "Size_MB"
FROM V$RMAN_BACKUP_JOB_DETAILS
GROUP BY INPUT_TYPE;
c) Delete Obsolete Backups
RMAN> DELETE NOPROMPT OBSOLETE;
7. Best Practices
| Area | Recommendation |
|---|---|
| Frequency | Perform daily incremental (L1) and weekly full (L0) backups |
| Archivelog Handling | Always back up and delete archived logs post-backup |
| Retention | Maintain at least 7–14 days depending on RPO/RTO |
| Validation | Run RESTORE VALIDATE DATABASE weekly |
| Storage | Use compressed backupsets to save space |
| Automation | Schedule backups with crontab or Windows Task Scheduler |
| Testing | Perform restore tests quarterly |
Conclusion
A well-planned RMAN Level 0 and Level 1 backup strategy ensures data resilience and quick recovery in Oracle 19c environments. Automating backups, applying retention policies, and regularly validating your backup sets are key to preventing data loss.
With these practices in place, DBAs can confidently meet uptime and recovery objectives — ensuring every byte of critical data is protected, recoverable, and verified.
Please reach out to us for more information.