2.
Create a single backup, outside of the automatic backups, by using the command
odacli create-backup
.
Use the Database Resource ID to identify the database to backup, specify the type
of backup, and use a tag to create a name for the backup. You can use up to 30
alphanumeric characters for the backup name tag. If you do not select a backup
type (level 0, level 1, or LongTerm), a level 1 backup is performed. For example,
create a level 0 backup named
2018Jan02_HRLevel0
for resource ID
20576eb1-
bc32-4e34-bf97-fda0b60ca15b
# odacli create-backup -i20576eb1-bc32-4e34-bf97-fda0b60ca15b -bt
Regular-L0 -t 2018Jan02_HRLevel0
When the job finishes, a backup report is generated for the backup. The report
contains all of the metadata required to recover a database.
3.
(Optional) Display a list of backup reports.
# odacli list-backupreports
4.
(Optional) Display a list of all scheduled backups.
# odacli list-schedules
Recovering a Database with the CLI
Recover the database to the system using a Backup Report, point-in-time recovery
(PITR), a system change number (SCN), or from the latest backup time.
Recovering a database in Oracle Database Appliance is a full RMAN database
recovery.
Recovering from a backup report requires JSON input for the backup report.
1.
Display a list of backup reports and locate the latest Backup Report for the
database and save the Backup Report ID.
# odacli list-backupreports
2.
Use the Backup Report ID to display the details of the Backup Report. Determine
how you want to recover the database: PITR, SCN, or Latest and locate the
needed information in the Backup Report.
# odacli describe-backupreport -i 2d82460c-d648-4e75-8c7d-72cc90bc442a
{
"id" : "2d82460c-d648-4e75-8c7d-72cc90bc442a",
"dbResId" : "b5fc646e-01a6-4c8b-8286-7633346c4329",
"tag" : null,
"dbId" : "2717054291",
"dbName" : "ExampleDB",
"dbUniqueName" : "ExampleDBu",
"backupType" : "REGULAR-L1",
"keepDays" : null,
"backupLocation" : "https://swiftobjectstorage.example.com/v1/dbaasimage/backupbucket",
"cfBackupHandle" : "c-2717054291-20180108-04",
"spfBackupHandle" : "c-2717054291-20180108-04",
"pitrTimeStamp" : "January 08, 2018 12:43:14 PM UTC",
"pitrSCN" : "1175058",
"resetLogsTimeStamp" : "January 08, 2018 09:55:34 AM UTC",
"resetLogsSCN" : "1112268",
Chapter 11
Using the CLI to Backup, Restore, and Recover
11-19
Содержание Database Appliance X6-2-HA
Страница 15: ...Index xv...