Wednesday, May 21, 2025

How to backup users tablespace from cdb and pdb oracle database ?

Backup users tablespace from cdb and pdb oracle database


[oracle@orcl dbs]$ rman target /


Recovery Manager: Release 19.0.0.0.0 - Production on Wed May 21 12:53:49 2025

Version 19.3.0.0.0


Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.


connected to target database: DB1 (DBID=1788905834)


RMAN> report schema ;


using target database control file instead of recovery catalog

Report of database schema for database with db_unique_name DB1


List of Permanent Datafiles

===========================

File Size(MB) Tablespace           RB segs Datafile Name

---- -------- -------------------- ------- ------------------------

1    900      SYSTEM               YES     /u01/app/oracle/oradata/DB1/system01.dbf

3    630      SYSAUX               NO      /u01/app/oracle/oradata/DB1/sysaux01.dbf

4    275      UNDOTBS1             YES     /u01/app/oracle/oradata/DB1/undotbs01.dbf

5    270      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/DB1/pdbseed/system01.dbf

6    330      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/DB1/pdbseed/sysaux01.dbf

7    5        USERS                NO      /u01/app/oracle/oradata/DB1/users01.dbf

8    100      PDB$SEED:UNDOTBS1    NO      /u01/app/oracle/oradata/DB1/pdbseed/undotbs01.dbf

9    270      PDB:SYSTEM           NO      /u01/app/oracle/oradata/DB1/pdb/system01.dbf

10   340      PDB:SYSAUX           NO      /u01/app/oracle/oradata/DB1/pdb/sysaux01.dbf

11   100      PDB:UNDOTBS1         NO      /u01/app/oracle/oradata/DB1/pdb/undotbs01.dbf

12   5        PDB:USERS            NO      /u01/app/oracle/oradata/DB1/pdb/users01.dbf

16   270      DEMO1:SYSTEM         NO      /u01/app/oracle/oradata/demo1/system01.dbf

17   340      DEMO1:SYSAUX         NO      /u01/app/oracle/oradata/demo1/sysaux01.dbf

18   100      DEMO1:UNDOTBS1       NO      /u01/app/oracle/oradata/demo1/undotbs01.dbf


List of Temporary Files

=======================

File Size(MB) Tablespace           Maxsize(MB) Tempfile Name

---- -------- -------------------- ----------- --------------------

1    131      TEMP                 32767       /u01/app/oracle/oradata/DB1/temp01.dbf

2    36       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/DB1/pdbseed/temp012025-03-06_12-16-29-897-PM.dbf

3    128      PDB:TEMP             32767       /u01/app/oracle/oradata/DB1/pdb/temp01.dbf

4    128      DEMO1:TEMP           32767       /u01/app/oracle/oradata/demo1/temp012025-03-06_12-16-29-897-PM.dbf


RMAN>


RMAN> backup tablespace pdb:users, users;


Starting backup at 21-MAY-25

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=42 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00012 name=/u01/app/oracle/oradata/DB1/pdb/users01.dbf

channel ORA_DISK_1: starting piece 1 at 21-MAY-25

channel ORA_DISK_1: finished piece 1 at 21-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/2FACECCE69615207E0630400040AB366/backupset/2025_05_21/o1_mf_nnndf_TAG20250521T125551_n2vmbqvv_.bkp tag=TAG20250521T125551 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00007 name=/u01/app/oracle/oradata/DB1/users01.dbf

channel ORA_DISK_1: starting piece 1 at 21-MAY-25

channel ORA_DISK_1: finished piece 1 at 21-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_21/o1_mf_nnndf_TAG20250521T125551_n2vmbsgr_.bkp tag=TAG20250521T125551 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

Finished backup at 21-MAY-25


Starting Control File and SPFILE Autobackup at 21-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_21/o1_mf_s_1201697756_n2vmbyk4_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 21-MAY-25


RMAN>

No comments:

Post a Comment

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Oracle 19c to PostgreSQL 15 Migration: Step-by-Step Production Guide (Ora2Pg + DMS)

Production-oriented migration approach for a complex Oracle 19c to PostgreSQL 15 workload , covering assessment, schema and code conversion,...