Parameters
Parameter Description
--backupReport
,
-br
{Regular-L0|Regular-L1|
Longterm}
(Optional) JSON input for a backup report.
--dbName
,
-in
Defines the Database Name.
--dbid
,
-i
Defines the Database Resource ID.
--help
,
-h
(Optional) Displays help for using the command.
--json
,
-j
(Optional) Displays JSON output. The default is false.
--recoveryTimeStamp
,
-r
(Optional) Defines the date and time of the backup. The
Recovery Timestamp (in format mm/dd/yyyy hh:mm:ss)
is required when the recovery is a point in time recovery
(PITR).
--recoverytype
,
-t
{Latest|PITR|SCN}
(Optional) Defines the recovery type. Do not provide the
recovery type if you define the Backup Report.
--rmanrecoverypassword(s)
,
-p
(Optional) Defines the password for recovery. You can
provide more than one password, but the passwords
must be within single quote separated by comma(,).
--scn
,
-s
(Optional) Defines the SCN recovery type. Required
when the RecoveryType is SCN.
Usage Notes
Recovers a database to the latest, a point in time recovery (PITR), or System Change
Number (SCN) as input. You can also recover a database from a Backup Report
provided as JSON input file.
This command performs various environment and validation checks in order to attempt
to ensure that recovery of database is successful. If backups are in ObjectStore, the
RMAN recovery passwords are needed to recover the database. This includes RMAN
restore and recovery.
This command always performs a full RMAN database restore and recovery. This
command is most useful when there is a complete database loss or when the majority
of the database files are lost. If you do not require a full RMAN restore, you can
perform a manual recovery. For example, a single data file loss or control file loss.
Example 13-42 Recovering a Database to a Point-in-Time
# odacli recover-database -i b5fc646e-01a6-4c8b-8286-7633346c4 -t PITR -r
11/08/2017 12:57:33 –p
Example 13-43 Recovering a Database to the Latest
# odacli recover-database -i b5fc646e-01a6-4c8b-8286-7633346c4 -t Latest -p
Example 13-44 Recovering a Database to an SCN
# odacli recover-database -i b5fc646e-01a6-4c8b-8286-7633346c4 -t SCN -s
392375947
Chapter 13
odacli Backup and Recovery Commands
13-49