Backup and Recovery from DB Console

You may face problem in taking backup to oracle container for oracle cloud RAC. Please follow below link to troubleshoot.

https://clouddba.co/kbhs-00712-ora-29024-received-from-local-http-service-during-backup-in-rac-oracle-cloud/

Once you have resolved the issue,You can proceed with backup

Please proceed to take backup

Backup log location

You can find backup of RMAN log for oracle cloud in following location:-

[oracle@pocracdemo1 ~]$ cd /home/oracle/bkup/logs/rman/

Please note that actually RMAN commands are being executed from backend
Recovery Manager: Release 12.2.0.1.0 – Production on Fri Apr 13 07:50:38 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1500943058)
RMAN> set command id to “Backup_-8270960425676936486”;
2> list db_unique_name all;
3> list incarnation of database;
4> show all;
5> report schema;
6> set encryption on;
7> backup device type sbt backupset all;
8> backup device type sbt datafilecopy all;
9> delete force noprompt obsolete recovery window of 7 days device type disk;

Now you can see your backup successfully executed

Updating password by using RACCLI utility

1.Connect to the compute node as the opc user.Update the password:

2.$ raccli update backupconfig -params ‘{“cloudStorageUser”:”user-name“,”cloudStoragePwd”:”new-password“}’

where user-name is the user name of the Oracle Cloud user whose credentials are used to access the Storage Cloud Service container and new-password is this user’s new password.

If you have used the update rdk subcommand of the raccli utility to update the cloud tooling to 16.4.5 or later, you must manually update the opc installer for the Oracle Database Cloud Backup Module before you use the update backupconfig subcommand. For instructions, see in Updating the cloud tooling on a deployment hosting Oracle RAC requires manual update of the Oracle Database Cloud Backup Module in Known Issues for Oracle Database Cloud Service.

Customizing with files in RAC needs to be backed up

Customizing Which System Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/oscfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Database Configuration Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/dbcfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Grid Infrastructure Configuration Files Are Backed Up

1.Connect as the opc user to the compute node.

2.Edit the contents of the /opt/oracle/dcs/rdbaas/config/gicfg.spec file.

3.The backup feature provided by Oracle Database Cloud Service backs up the files and folders listed in this specification file.

RACCLI command to update disk recovery window

[opc@pocracdemo1 ~]$ raccli update backupconfig -params '{"diskRecoveryWindow" : 3}'
{
  “jobId” : “22”,
  “requestStatus” : “SUCCESS”
}

[opc@pocracdemo1 ~]$ raccli describe job 22

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “RUNNING”,
  “response” : [ ]
}

where days is the number of days for which you want to retain backups.

Changing recovery window in cloud storage

[opc@pocracdemo1 ~]$ raccli update backupconfig -params '{"ossRecoveryWindow" : 15}'
{
  “jobId” : “23”,
  “requestStatus” : “SUCCESS”
}

where days is the number of days for which you want to retain backups.

Please check now that retention policy got changed.

[oracle@pocracdemo1 ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 – Production on Fri Apr 13 08:12:55 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (DBID=1500943058)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 15 DAYS;

Customizing time of automatic daily backup

1.Connect as the opc user to the compute node.

2.Enter this raccli command:

     $ raccli update backupconfig -params '{"cronDate" : "time"}'

 where time is the time (using 24-hour, HH:MM format) when daily backups are to occur. For example, "02:45" is 2:45 AM, and "14:45" is 2:45 PM.

Changing backup configuration for RAC cloud storage

1.Connect as the opc user to compute node 1.

2.Use the raccli update backupconfig command to update the configuration.

3.To change the backup destination to Both Cloud Storage and Local Storage, enter the following command. Line breaks have been added for clarity; you must enter the command on a single line.

$ raccli update backupconfig -params '{"diskEnabled" : true, "ossEnabled" : true, 
  "cloudStorageUser" : "username", "cloudStoragePwd" : "password", 
  "cloudStorageContainerUrl" : "container-URL"}'

where:

  • username is the user name of an Oracle Cloud user who has read/write access to the container.
  • password is the password of the user specified in cloudStorageUser.
  • container-URL is the URL of the Oracle Storage Cloud container.
Example:-raccli update backupconfig -params '{"diskEnabled" : true, "ossEnabled" : true, "cloudStorageUser" : "sadhuarun1980@gmail.com", "cloudStoragePwd" : "xxx", "cloudStorageContainerUrl" : "https://sadhuarun.eu.storage.oraclecloud.com/v1/Storage-sadhuarun/racbackup"}'

Restore latest backup in RAC

[opc@pocracdemo1 ~]$ raccli create recovery -latest

{
  “jobId” : “24”,
  “joburi” : “http://localhost:7070/dcs/24/responses”,
  “requestStatus” : “SUCCESS”
}

[opc@pocracdemo1 ~]$ raccli describe job 24

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “RUNNING”,
  “response” : [ {
    “startTime” : “Fri Apr 13 08:25:58 UTC 2018”,
    “status” : “RUNNING”,
    “taskId” : “TaskZJsonRpcExt_5749”,
    “taskName” : “Database Recovery”
  } ]

}

Now once it successfully restore,You can describe the job again

[opc@pocracdemo1 ~]$ raccli describe job 24

{
  “requestStatus” : “SUCCESS”,
  “jobStatus” : “SUCCESS”,
  “response” : [ {
    “startTime” : “Fri Apr 13 08:25:58 UTC 2018”,
    “endTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “status” : “SUCCESS”,
    “taskId” : “TaskZJsonRpcExt_5749”,
    “taskResult” : “Resource { id: 104049597281494, name: rdbaas_recovery_database, type: RecoveryComponent }”,
    “taskName” : “Database Recovery”
  }, {
    “startTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “endTime” : “Fri Apr 13 08:32:44 UTC 2018”,
    “status” : “SUCCESS”,
    “taskId” : “TaskZJsonRpcExt_5751”,
    “taskResult” : “Resource { id: 104456071050168, name: null, type: Recovery }”,
    “taskName” : “Persist Recovery Metadata”
  } ]

}

Restoring to specific point in time using RACCLI

[opc@pocracdemo1 ~]$ raccli create recovery -pitr -timestamp '04/13/2018 08:30:30'
{
  “jobId” : “25”,
  “joburi” : “http://localhost:7070/dcs/25/responses”,
  “requestStatus” : “SUCCESS”
}

cd /home/oracle/bkup/logs/rman

RMAN> list db_unique_name all;
2> list incarnation of database;
3> show all;
4> report schema;
5> run { set until time =”to_date(’04/13/2018 08:30:30′,’mm/dd/yyyy hh24:mi:ss’)”; restore database; recover database; }
6> alter database open resetlogs;
7> shutdown immediate;
8>

You can also recover using DB console

 

Leave a Reply

Your email address will not be published. Required fields are marked *