In Oracle Database operations, RMAN (Recovery Manager) is the cornerstone of data protection. RMAN offers two primary storage formats: “Backup Sets” and “Image Copies.”
A common question is, “Which one should I use?” In short: “Choose Backup Sets if you want to save storage space and maintain operational flexibility; choose Image Copies if you prioritize minimizing downtime and immediate recovery.”
This article provides an easy-to-understand explanation for beginners regarding the types of RMAN backups, how to choose between them, and the specific commands to execute.
- Conclusion: Quick Comparison of Backup Sets and Image Copies
- 1. What is an Oracle RMAN Backup Set?
- 2. What is an Oracle RMAN Image Copy?
- 3. Comparison Table: Backup Set vs. Image Copy
- 4. Execution Examples: Backing up with RMAN Commands
- 5. Troubleshooting (Common ORA Errors)
- 6. Operational and Security Notes
- 7. FAQ (Frequently Asked Questions)
- Summary
Conclusion: Quick Comparison of Backup Sets and Image Copies
Here is a concise summary of the differences and a “to-do list” for each.
Backup Set
- Feature: RMAN’s proprietary format that excludes unused blocks and supports compression.
- Use Case: Daily incremental backups, long-term storage on tape, and space optimization.
Image Copy
- Feature: A bit-for-bit duplicate of files, similar to the OS
cpcommand. - Use Case: Fast recovery (switchover) and building Data Guard environments.
1. What is an Oracle RMAN Backup Set?
A backup set is the default backup format for RMAN. It consists of one or more physical files called “Backup Pieces.”
Mechanism and Benefits
The most significant feature is “Unused Block Skipping.” For example, if only 2GB of data exists in a 10GB data file, the backup set will only be approximately 2GB (plus management information) in size.
- Incremental Backups: Can extract only the changes made since the previous backup.
- Compression and Encryption: Built-in RMAN features allow data to be stored securely and compactly.
- File Consolidation: Multiple data files can be combined into a single backup piece, simplifying file management.
2. What is an Oracle RMAN Image Copy?
An image copy is a method of writing out data files to disk in their original format.
Mechanism and Benefits
By skipping the “restore from backup” step, you can instruct the database to recognize the backup file itself as the production file (Switching). This dramatically reduces recovery time for large databases.
- Immediate Availability: Use the RMAN
SWITCH DATAFILEcommand to switch to the backup side almost instantly. - OS Command Compatibility: Since the file format remains unchanged, contents are easy to verify.
- Constraints: Only supports output to disk (cannot output directly to tape). Additionally, unused block skipping is not performed.
3. Comparison Table: Backup Set vs. Image Copy
Choose the appropriate method based on your operational requirements.
| Comparison Item | Backup Set | Image Copy |
| File Format | RMAN Proprietary (Binary) | Identical to OS file |
| Unused Blocks | Skipped (Saves space) | Copied as-is |
| Incremental Backup | Supported | Not supported (Incremental apply is possible) |
| Restore Speed | Moderate (Requires write-back) | Extremely Fast (Switch only) |
| Main Use Case | Space saving / Generation mgmt | Fast recovery / Standby DB |
4. Execution Examples: Backing up with RMAN Commands
When executing on a live system, connect to RMAN using a user with SYSBACKUP or SYSDBA privileges.
Prerequisites
- Target OS: Oracle Linux / Windows, etc.
- DB Configuration: 19c (CDB/PDB)
- Privileges:
SYSBACKUPprivilege - Note: If the password contains special characters like
@, enclose it in quotes.
Obtaining a Backup Set
Backup sets are selected by default.
-- Take a full database backup as a backup set
BACKUP DATABASE;
-- Include archived logs (Recommended)
BACKUP DATABASE PLUS ARCHIVELOG;
Explanation: BACKUP DATABASE efficiently stores data by excluding unused blocks.
Obtaining an Image Copy
Explicitly specify the AS COPY clause.
-- Take a full database backup as an image copy
BACKUP AS COPY DATABASE;
-- Copy only a specific data file (File ID: 1)
BACKUP AS COPY DATAFILE 1;
Explanation: Since the file is duplicated exactly, recovery is possible simply by moving or switching to the file.
Channel Control with RUN Blocks
Use a RUN block to increase parallelism or specify specific devices.
RUN {
-- Allocate two channels for disk writes (Parallelization)
ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
-- Execute backup with a tag
BACKUP DATABASE TAG 'DAILY_FULL_SET';
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
}
5. Troubleshooting (Common ORA Errors)
Here is how to handle errors frequently encountered during backup execution.
| Error Code | Cause | Action |
| ORA-19809 | Fast Recovery Area (FRA) full | Delete obsolete backups or increase DB_RECOVERY_FILE_DEST_SIZE. |
| ORA-19504 | Output directory does not exist | Verify/create the path specified in BACKUP FORMAT. |
| ORA-15025 | Insufficient access to ASM disk | Check Grid Infrastructure permission settings. |
6. Operational and Security Notes
- Backup Set Risk: Because it is a proprietary format, you cannot view the contents without RMAN. Always ensure you also back up the Control File.
- Image Copy Note: Consumes the same size as the physical files, which can strain disk capacity.
- Verification: Develop the habit of checking for backup corruption using the
RESTORE DATABASE VALIDATE;command to prepare for potential failures.
7. FAQ (Frequently Asked Questions)
Q1. How can I compress a backup set?
A1. Execute BACKUP AS COMPRESSED BACKUPSET DATABASE;. This further reduces size but increases CPU load.
Q2. Can I take incremental backups from an image copy?
A2. While the image copy itself is “full,” you can maintain a pseudo-current state by “applying” (RECOVER) incremental backups (backup sets) to an image copy (Incrementally Updated Backups).
Q3. Which method is mainstream?
A3. From a storage efficiency standpoint, backup sets are mainstream in most companies. However, mission-critical systems often use image copies in tandem to reduce restoration time.
Summary
- Backup Set is the standard method for saving capacity.
- Image Copy is a physical copy method for minimizing recovery time.
- In a 19c environment, the best practice is typically to use backup sets for general use and consider image copies only for specific data files where rapid recovery is required.
This article is based on Oracle Database 19c (screens and default values may differ in other versions).
[reference]
Oracle Database Backup and Recovery Reference, 19c


コメント