external_backup_jobs
Creates, updates, deletes, gets or lists an external_backup_jobs resource.
Overview​
| Name | external_backup_jobs |
| Type | Resource |
| Id | oci.database.external_backup_jobs |
Fields​
The following fields are returned by SELECT queries:
- get
The backup of an external database.
| Name | Datatype | Description |
|---|---|---|
backupId | string | The [OCID](/Content/General/Concepts/identifiers.htm) of the associated backup resource. |
bucketName | string | The name of the Swift compartment bucket where the backup should be stored. |
provisioning | boolean | An indicator for the provisioning state of the resource. If TRUE, the resource is still being provisioned. |
swiftPassword | string | The auth token to use for access to the Swift compartment bucket that will store the standalone backup. For information about auth tokens, see [Working with Auth Tokens](/Content/Identity/Tasks/managingcredentials.htm#two). |
swiftPath | string | The Swift path to use as a destination for the standalone backup. |
tag | string | The tag for RMAN to apply to the backup. |
userName | string | The Swift user name to use for transferring the standalone backup to the designated Swift compartment bucket. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | backupId, region | Gets information about the specified external backup job.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br /> | |
create | insert | region, availabilityDomain, compartmentId, dbVersion, dbName, externalDatabaseIdentifier, displayName, characterSet, ncharacterSet, databaseMode, databaseEdition | opc-retry-token | Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br /> |
complete_external_backup_job | exec | backupId, region | if-match, opc-retry-token | Changes the status of the standalone backup resource to ACTIVE after the backup is created from the on-premises database and placed in Oracle Cloud Infrastructure Object Storage.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br /> |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
backupId | string | The backup [OCID](/Content/General/Concepts/identifiers.htm). |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. |
opc-retry-token | string | A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected). |
SELECT examples​
- get
Gets information about the specified external backup job.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br />
SELECT
backupId,
bucketName,
provisioning,
swiftPassword,
swiftPath,
tag,
userName
FROM oci.database.external_backup_jobs
WHERE backupId = '{{ backupId }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples​
- create
- Manifest
Creates a new backup resource and returns the information the caller needs to back up an on-premises Oracle Database to Oracle Cloud Infrastructure.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br />
INSERT INTO oci.database.external_backup_jobs (
availabilityDomain,
characterSet,
compartmentId,
databaseEdition,
databaseMode,
dbName,
dbUniqueName,
dbVersion,
displayName,
externalDatabaseIdentifier,
ncharacterSet,
pdbName,
region,
opc-retry-token
)
SELECT
'{{ availabilityDomain }}' /* required */,
'{{ characterSet }}' /* required */,
'{{ compartmentId }}' /* required */,
'{{ databaseEdition }}' /* required */,
'{{ databaseMode }}' /* required */,
'{{ dbName }}' /* required */,
'{{ dbUniqueName }}',
'{{ dbVersion }}' /* required */,
'{{ displayName }}' /* required */,
{{ externalDatabaseIdentifier }} /* required */,
'{{ ncharacterSet }}' /* required */,
'{{ pdbName }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
backupId,
bucketName,
provisioning,
swiftPassword,
swiftPath,
tag,
userName
;
# Description fields are for documentation purposes
- name: external_backup_jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the external_backup_jobs resource.
- name: availabilityDomain
value: "{{ availabilityDomain }}"
description: |
The targeted availability domain for the backup.
- name: characterSet
value: "{{ characterSet }}"
description: |
The character set for the database.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment where this backup should be created.
- name: databaseEdition
value: "{{ databaseEdition }}"
description: |
The Oracle Database Edition that applies to all the databases on the DB system.
Exadata DB systems and 2-node RAC DB systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.
valid_values: ['STANDARD_EDITION', 'ENTERPRISE_EDITION', 'ENTERPRISE_EDITION_HIGH_PERFORMANCE', 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE', 'ENTERPRISE_EDITION_DEVELOPER']
- name: databaseMode
value: "{{ databaseMode }}"
description: |
The mode (single instance or RAC) of the database being backed up.
valid_values: ['SI', 'RAC']
- name: dbName
value: "{{ dbName }}"
description: |
The name of the database from which the backup is being taken.
- name: dbUniqueName
value: "{{ dbUniqueName }}"
description: |
The `DB_UNIQUE_NAME` of the Oracle Database being backed up.
- name: dbVersion
value: "{{ dbVersion }}"
description: |
A valid Oracle Database version.
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name for the backup. This name does not have to be unique.
- name: externalDatabaseIdentifier
value: {{ externalDatabaseIdentifier }}
description: |
The `DBID` of the Oracle Database being backed up.
- name: ncharacterSet
value: "{{ ncharacterSet }}"
description: |
The national character set for the database.
- name: pdbName
value: "{{ pdbName }}"
description: |
The pluggable database name.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
description: A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
Lifecycle Methods​
- complete_external_backup_job
Changes the status of the standalone backup resource to ACTIVE after the backup is created from the on-premises database and placed in Oracle Cloud Infrastructure Object Storage.<br /><br />Note: This API is used by an Oracle Cloud Infrastructure Python script that is packaged with the Oracle Cloud Infrastructure CLI. Oracle recommends that you use the script instead using the API directly. See [Migrating an On-Premises Database to Oracle Cloud Infrastructure by Creating a Backup in the Cloud](/Content/Database/Tasks/mig-onprembackup.htm) for more information.<br />
EXEC oci.database.external_backup_jobs.complete_external_backup_job
@backupId='{{ backupId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"cfBackupHandle": "{{ cfBackupHandle }}",
"dataSize": {{ dataSize }},
"redoSize": {{ redoSize }},
"spfBackupHandle": "{{ spfBackupHandle }}",
"sqlPatches": "{{ sqlPatches }}",
"tdeWalletPath": "{{ tdeWalletPath }}"
}'
;