Oracle SBT for Cloud Storage enables the backup and restoration of Oracle databases to and from cloud storage.
Utilized Clean-room design principles to understand the Oracle Media Management Layer (MML) API and developed the corresponding functionality.
This library is useful
- To backup on-premise oracle database to cloud storage
- Cloud native backup solutions does not meet the requirements
-
Cloud Storage
- Azure Blob Storage (both block blob and append blob)
-
Linux
a. GLIBC 2.17 or later
-
Windows
-
Download the library archive
a. Linux
b. Windows
-
Extract the library archive to a folder
- NOTE: Do not extract the archive to Oracle installation directories
-
Create configuration file
- Refer configuration documentation for available options
-
Make sure the user oracle service runs as has read access to the extracted library and configuration
Configuration file uses YAML syntax
Refer 'Microsoft Documentation' for blob storage limits.
The library stores each oracle backup piece as a single block blob, memory buffer is used to cache the data from oracle database and the data is then written to storage as a single uncommitted block once the buffer is full.
All the uncommitted blocks will be committed once the data write to backup piece is complete.
When the number of blocks written exceeds 50K error will be raised.
Blob maximum size will be equal to 50K times the 'BLKSIZE' parameter in Oracle RMAN. For default 'BLKSIZE' value 256KiB the maximum blob size is 12GiB, after reaching the data upload reaches the maximum blob size error will be returned.
To increase the maximum blob size consider increasing the 'BLKSIZE', recommended 'BLKSIZE' is 8MiB per channel. Refer "Configure block size in RMAN" to adjust the 'BLKSIZE'
MAX BLOB SIZE = 50000 * BLKSIZE
---
storage_type: 'block_blob'
block_blob_options:
storage_url: 'https://<storage account>.blob.core.windows.net/<container name>/<key prefix : optional>/?<sas token>'Refer 'Microsoft Documentation' for blob storage limits.
The library stores each oracle backup piece as a single append blob, memory buffer is used to cache the data from oracle database and the data is appended to the blob as a single block once the buffer is full.
Append blob will be sealed to make it read-only once the data write to backup piece is complete.
When the number of blocks written exceeds 50K error will be raised.
Blob maximum size will be equal to 50K times the 'BLKSIZE' parameter in Oracle RMAN. For default 'BLKSIZE' value 256KiB the maximum blob size is 12GiB, after reaching the data upload reaches the maximum blob size error will be returned.
To increase the maximum blob size consider increasing the 'BLKSIZE', recommended 'BLKSIZE' is 4MiB per channel.
For backup operation 4MiB is the maximum allowed 'BLKSIZE' when using append blob because of the storage limits.
MAX BLOB SIZE = 50000 * BLKSIZE
---
storage_type: 'append_blob'
block_blob_options:
storage_url: 'https://<storage account>.blob.core.windows.net/<container name>/<key prefix : optional>/?<sas token>'Make sure "<library location full path>" is replaced with the full path to the library location including the library file name and "<parameter file path>" is replaced with full path to the parameters file.
connect target /;
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE SBT_TAPE PARMS='SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>)';
ALLOCATE CHANNEL c2 DEVICE TYPE SBT_TAPE PARMS='SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>)';
BACKUP AS BACKUPSET DATABASE FORMAT '/%d/%Y/%M/%D/%U';
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
}
-
Login to RMAN
-
Connect to target
connect target /;
- Configure SBT parameters
CONFIGURE CHANNEL DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>)';
- Set SBT as the default device type
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 2;
- Run backup operation
BACKUP AS BACKUPSET DATABASE FORMAT '/%d/%Y/%M/%D/%U';
- On each allocated channel
connect target /;
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE SBT_TAPE PARMS='SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>),BLKSIZE=8388608';
ALLOCATE CHANNEL c2 DEVICE TYPE SBT_TAPE PARMS='SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>),BLKSIZE=8388608';
BACKUP AS BACKUPSET DATABASE FORMAT '/%d/%Y/%M/%D/%U';
RELEASE CHANNEL c1;
RELEASE CHANNEL c2;
}
- For Automatic SBT channels
CONFIGURE CHANNEL DEVICE TYPE SBT_TAPE PARMS 'SBT_LIBRARY=<library location full path>,ENV=(GB_SBT_PARAM_FILE=<parameter file path>),BLKSIZE=8388608';
- Oracle RMAN Proxy Copies are not supported.
- Append blob seal will fail is the storage account has 'hierarchical namespace' enabled.