How to Use RMAN to Back Up Oracle CDB and PDB Step by Step?

Oracle multitenant databases need careful backup planning. This guide explains how to back up both CDB and PDB using RMAN. Learn step-by-step commands, best practices, and key recovery scenarios.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
roy-caldwell

Updated by Roy Caldwell on 2025/12/29

Table of contents
  • What Are CDB and PDB in Oracle?

  • What Is RMAN Backup?

  • Why Use RMAN Backup for CDB and PDB?

  • Method 1. How to Back Up Oracle CDB with RMAN?

  • Method 2. How to Back Up Oracle PDB with RMAN?

  • How to Back Up Oracle Databases with Vinchin Backup & Recovery?

  • RMAN Backup CDB and PDB FAQs

  • Conclusion

Oracle’s multitenant architecture offers flexibility but also brings new backup challenges. If you manage a Container Database (CDB) with multiple Pluggable Databases (PDBs), you need a reliable backup strategy. In this guide, we’ll cover essential rman backup cdb and pdb techniques. You’ll learn core concepts, practical RMAN commands, optimization tips, common recovery scenarios, and how Vinchin can simplify your workflow.

What Are CDB and PDB in Oracle?

Oracle introduced multitenant architecture to streamline database management. A Container Database (CDB) acts as the main database instance. Inside it are one or more Pluggable Databases (PDBs)—each is self-contained but shares Oracle binaries and some system resources with others.

This design lets you manage many databases as one while keeping them isolated from each other. Each PDB has its own data dictionary and user data but relies on the CDB root for system metadata. This separation improves security, resource allocation, and patching efficiency.

For example, if you run several applications that require separate databases but want to reduce overhead or simplify upgrades, using PDBs inside a single CDB makes sense. You can clone PDBs quickly or move them between servers without downtime.

What Is RMAN Backup?

Recovery Manager (RMAN) is Oracle’s built-in tool for database backup and recovery tasks. It supports full database backups as well as incremental ones that only capture changes since the last backup.

With RMAN you can:

  • Back up entire databases or specific tablespaces

  • Automate archiving of redo logs

  • Validate backups before disaster strikes

  • Restore individual files or whole environments

RMAN understands Oracle’s internal structures better than manual file copies ever could. It tracks which blocks have changed so incremental backups are efficient. It also manages retention policies so old backups don’t fill up your storage.

In multitenant setups—where you have both CDBs and multiple PDBs—RMAN remains the recommended way to protect all your data.

Why Use RMAN Backup for CDB and PDB?

Why not just copy server files? Because RMAN knows exactly how Oracle stores information—it tracks block-level changes across containers so nothing gets missed between scheduled runs.

With multitenant setups especially:

  • You choose whether to protect everything together—or isolate just what matters most.

  • Single-PBD restores avoid downtime elsewhere.

  • Automated scheduling keeps teams focused on business goals rather than manual chores.

  • Built-in validation means fewer surprises during audits or compliance reviews.

According to Oracle documentation, only RMAN provides full-featured support across complex multitenant deployments.

Method 1. How to Back Up Oracle CDB with RMAN?

Backing up the whole CDB protects both the root container and every attached PDB at once—a best practice for disaster recovery planning.

First things first: connect to your Oracle server using an account in either the dba or oinstall group at the operating system level. This gives you SYSBACKUP privileges by default if OS authentication is enabled.

rman target /

Once connected to RMAN from your server shell prompt, configure basic settings before running any jobs:

CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;

These commands ensure all backups go to disk by default—and that control files are always backed up automatically after each job finishes.

To back up everything—including all datafiles across every PDB plus archived redo logs—run:

BACKUP DATABASE PLUS ARCHIVELOG;

This command creates a complete snapshot of your environment: all datafiles from root container (CDB$ROOT), seed (PDB$SEED), user-created PDBs; control files; SPFILE; archived logs needed for point-in-time recovery.

Want to check what was backed up? Use:

LIST BACKUP;

This lists every backup set currently stored according to your retention policy settings.

By backing up at this level regularly, you ensure fast full restores—even if several PDBs fail at once due to hardware issues or human error.

Optimizing and Validating CDB Backups

Large environments demand more than just basic commands—they need efficiency checks too. For example:

If storage space is tight but CPU resources are available during off-hours, consider compressed backups:

BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;

Compression reduces disk usage but increases CPU load during backup windows—a tradeoff worth considering when planning schedules.

Validation matters too! To make sure existing backups aren’t corrupt—and can be restored when needed—run validation routines periodically:

RESTORE DATABASE VALIDATE;
RESTORE ARCHIVELOG ALL VALIDATE;

These commands simulate restore operations without actually writing files back out—so they’re safe even during production hours.

Finally: keep tabs on what needs attention using reporting tools built into RMAN itself:

REPORT NEED BACKUP;
REPORT OBSOLETE;

The first tells you which files haven’t been backed up recently enough based on your policy; the second helps clear out expired sets safely.

Method 2. How to Back Up Oracle PDB with RMAN?

Sometimes backing up every single database isn’t necessary—or practical—especially if only one application needs special protection or testing before major changes roll out.

You have two main ways to back up a specific pluggable database:

A. Back Up a PDB from the CDB Root

Connect as before via OS authentication (rman target /). Then specify which pluggable database should be protected:

BACKUP PLUGGABLE DATABASE pdb_name;

Replace pdb_name with your actual pluggable database name—for example: sales, hr, etc.

To see details about these targeted backups later:

LIST BACKUP OF PLUGGABLE DATABASE pdb_name;

This approach backs up all datafiles associated with that particular pluggable database while leaving others untouched.

B. Back Up a PDB by Connecting Directly

If delegated administration is required—or if local users manage their own pluggable databases—you can connect directly using network credentials:

rman target sys@pdb_name

Once connected directly into that specific pluggable database context:

BACKUP DATABASE;

This command only affects objects within that current pluggable database—not others in the same container.

Note: Some actions like archivelog management still require connecting through root because redo logs span all containers.

Partial Backups

Need even finer control? You can back up individual tablespaces within any given pluggable database—but remember: consistent partial backups require those tablespaces be open in READ WRITE mode throughout:

BACKUP TABLESPACE pdb_name:users;

Replace users with any valid tablespace name inside your chosen pluggable DB.

Partial strategies help minimize storage costs when only certain application areas change frequently—or when regulatory requirements dictate extra protection around sensitive datasets.

How to Back Up Oracle Databases with Vinchin Backup & Recovery?

For organizations seeking an easier yet robust solution beyond native tools like RMAN, Vinchin Backup & Recovery stands out as an enterprise-level platform supporting today’s mainstream databases—including Oracle, MySQL, SQL Server, MariaDB, PostgreSQL, PostgresPro, and TiDB. Key features such as advanced source-side compression, incremental backup capabilities tailored for Oracle workloads, batch processing of multiple databases simultaneously, flexible multi-level data compression options, and granular retention policies enable efficient storage use while ensuring compliance-readiness—all designed specifically for demanding enterprise environments.

Vinchin Backup & Recovery offers an intuitive web console that streamlines operations into four straightforward steps:

Step 1. Select the Oracle database to back up

Select the Oracle database to back up

Step 2. Choose the backup storage

Choose the backup storage

Step 3. Define the backup strategy

Define the backup strategy

Step 4. Submit the job

Submit the job

No scripting expertise required—the process is visualized end-to-end for maximum clarity and minimal risk of error. Recognized globally by thousands of enterprises with top industry ratings, Vinchin Backup & Recovery delivers trusted protection—try its fully featured free trial for 60 days by clicking download below!

RMAN Backup CDB and PDB FAQs

Q1: Can I restore a single PBD from a full-CDD-level RMAN backup?

Yes—but ensure both source/target containers share identical DBIDs otherwise cross-container restores will fail due to identifier mismatch constraints enforced by Oracle security models.

Q2: How do I automate daily RMAN backups including archivelogs cleanup?

Use an RMAN RUN block such as RUN { ALLOCATE CHANNEL ch1 DEVICE TYPE DISK BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT } schedule via cronjob include CONFIGURE CHANNEL settings persistently if needed.

Conclusion

Backing up Oracle CDBs and PBDs with RMAN is essential modern IT practice. Advanced options let experts fine-tune performance reliability. Vinchin streamlines these tasks further thanks intuitive interface powerful automation. Give it try today see difference yourself!

Share on:

Categories: Database Tips