rman
Allow users to submit RMAN commands to a list of shards for execution.
Syntax
rman -shard shard_list [-check_syntax] [-from_cdb userid[/password]]
[-catpwd password] [-async] (-cmd_file cmdfile | <quote>rman-stmts<quote>)
Options
Table 2-87 GDSCTL rman Options
| Option | Description |
|---|---|
-shard |
Specifies a comma-delimited list of shard identifiers. Each shard identifier can be a region, shardspace, shardgroup or shard name. If the same name is used for a region, shardspace, shardgroup or shard, region takes the highest precedence followed by shardspace, shardgroup and then shard. For example, assume a sharded database has a shardspace and a shard both named "foo". When name "foo" is provided in the specified shard list, it is considered a shardspace and expanded to a list of the shards in the shardspace "foo". Two special words can be used for shard list: ALL and CATALOG. "ALL" means the sharded database catalog database and all the shards in the database while "CATALOG" means only the catalog database. For commands where this parameter is optional, if this value is not specified the value defaults to "ALL". |
-check_syntax |
If specified, it only checks syntax for the input RMAN commands. |
-from_cdb |
This option provides a CDB common user and a password in the form of "user/password". When this option is used, the provided RMAN commands will be run from the shard root container. The provided user must have SYSBACKUP privilege. |
-catpwd |
The GSMCATUSER password |
-cmd_file |
RMAN command file path |
Usage Notes
RMAN commands can be supplied either with a command file or directly in the command line. The syntax of the commands is the same as when they are entered at the RMAN prompt.
When the comamnds are supplied in the command line, they must be put in quotation marks. If the commands themselves contain single quotes, then double quotes should be used for the commands.
Some RMAN commands can only be executed from CDB root. If such a command is supplied, option -FROM_CDB must be used. Commands that should be executed from the shard PDBs and those that should be executed from shard CDB root cannot be supplied at the same time.
Some RMAN commands cannot be used inside command files, for example, HOST.
These commands cannot be used here in the command line or through a command file.
Example
The command allows users to run various RMAN commands against the selected shards. The following example reports the objects needed to be backed up in the shards in shard group DBS1. Assuming that the shard PDB name is PDB1 for all the shards in shard group DBS1:
GDSCTL> rman -shard dbs1 -from_cdb 'report need backup of pluggable database pdb1;';
Assuming that datafile 1 for shard SHARD1 needs to be backed up. The example below shows how to back up the datafile for shard SHARD1:
GDSCTL> rman -shard shard1 -from_cdb 'backup datafile 1;';