Skip to main content

external_backup_jobs

Creates, updates, deletes, gets or lists an external_backup_jobs resource.

Overview​

Nameexternal_backup_jobs
TypeResource
Idoci.database.external_backup_jobs

Fields​

The following fields are returned by SELECT queries:

The backup of an external database.

NameDatatypeDescription
backupIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the associated backup resource.
bucketNamestringThe name of the Swift compartment bucket where the backup should be stored.
provisioningbooleanAn indicator for the provisioning state of the resource. If TRUE, the resource is still being provisioned.
swiftPasswordstringThe 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).
swiftPathstringThe Swift path to use as a destination for the standalone backup.
tagstringThe tag for RMAN to apply to the backup.
userNamestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbackupId, regionGets 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 />
createinsertregion, availabilityDomain, compartmentId, dbVersion, dbName, externalDatabaseIdentifier, displayName, characterSet, ncharacterSet, databaseMode, databaseEditionopc-retry-tokenCreates 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_jobexecbackupId, regionif-match, opc-retry-tokenChanges 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.

NameDatatypeDescription
backupIdstringThe backup [OCID](/Content/General/Concepts/identifiers.htm).
regionstringOCI 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-matchstringFor 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-tokenstringA 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​

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​

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
;

Lifecycle Methods​

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 }}"
}'
;