First, start RMAN, and connect to the pluggable database you want to back up. You must connect as a user with SYSDBA or SYSBACKUP privileges. Also, there must be a listener running and a password file in place. This example connects to the SALESPDB pluggable database:
$ rman target sys/foo@salespdb
Once connected to a pluggable database, you can only back up data files specific to that database. Therefore, for this example, the following command takes a backup of just data files associated with the SALESPDB pluggable database:
RMAN> backup database;
This example backs up the data files associated with the pluggable database SYSTEM tablespace:
RMAN> backup tablespace system;
I should emphasize again that when you are connected directly to a pluggable database, you can only back up data files associated with that database. You can’t back up data files associated with the root container or with any other pluggable databases within the container. Figure 1 illustrates this concept. A connection as SYSDBA to the SALESPDB pluggable database can only back up and view data files related to that database. The SYSDBA connection can’t see outside its pluggable box in regard to data files and RMAN backups of data files. In contrast, the SYSDBA connection to the root container can back up all data files (root, seed, and all pluggable databases) as well as access RMAN backups that were initiated from a connection to a pluggable database.
Figure 1. Purview of a SYSDBA connection to root container vs. a SYSDBA connection to a pluggable database