15 October 2018

create a manual backup for an Autonomous Transaction Processing database

When creating a manual backup for Autonomous Transaction Database (on Oracle Cloud Infrastructure) you will encounter a number of requirements. Once setup, it will be pretty straightforward. I will walk you through all steps. 

Note that I'm not an Oracle employee, and things will change in this world. Always consult the documentation to verify the steps you need to take.

Create een Autonomous Transaction Processing Database
  • Login to you Oracle Cloud Infrastructure
  • Go to Autonomous Transaction Processing
  • Click the button "[ Create Autonomous Transaction Processing Database ]"
  • Supply a name, password (1) and select your licensing model
  • Creating the database will take a few minutes, once it shows "Available" you can go on to the next step.

Download Client Credentials
  • Click the name of the database
  • Click on "[ Service Console ]"
  • Click on "[ Administration ]"
  • Click on "Download a Connection Wallet" and safe it in Downloads folder 
  • Note down the password (2) you create here

Connect with SQL Developer
  • Start up SQL Developer
  • Create a new connection
  • Username is Admin and password (1) 
  • Connection type is Cloud PDB
  • Configuration File is the wallet zip you downloaded (don't unzip)
  • Keystore password is password (2)
  • Service can be a service as contained in the wallet, e.g. the dbname_low

Create a Service User
  • In Oracle Cloud Infrastructure, go to Menu>Identity>Users
  • Create a user, sa_backup  (or some name for backups)
  • Select that user when created, and click Groups
  • Add the user to group Administrators
  • Click Authority Tokens, create token
  • Note down the token password (3)

Settings for defaults
  • Create credential in SQL Developer
BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(credential_name => 'DEF_CRED_NAME',
username => 'sa_backup',password => 'password as set above in (3)');
END;
/

alter database property set default_credential = 'ADMIN.DEF_CRED_NAME';
  • Set the default bucket, change according to your environment:
ALTER DATABASE PROPERTY SET default_bucket='https://swiftobjectstorage.eu-frankfurt-1.oraclecloud.com/v1/tenancy_name';


Create a bucket
  • Create a bucket with the correct name:
  • Menu>Object Storage>Object Storage>"[ Create Bucket ]"
  • Give the bucket the exact name backup_databasename, for example backup_mydb01 
Now go back to the ATP database in the Oracle Cloud Infrastructure, and create a manual backup with the button, this will run for a few minutes.

No comments:

Post a Comment