CREATE_ARCHIVAL_BACKUP

This procedure copies all backup pieces from Recovery Appliance as restricted by user inputs to TAPE with the ability to recover the protected database to a user specified point described by restore_until_scn, restore_until_time, or restore_point.

Backups created on TAPE using this API are KEEP backups and preserved until user specified keep_until_time.

Archival backups are validated using restore_point and restore_tag. If restore_point is not specified, it is generated internally. If restore_tag is not specified, tag values for archival backups will be the same as restore_point name.

Format for internally generated restore_point name is: <KEEP_BACKUP_><yyyyMMddHH24miSS>

Note:

The database must have archivelog mode turned on prior to trying to create an archival backup. This command requires the archive logs to properly compute the necessary files to create a complete consistent backup for archival purposes.

This API has the following restrictions for input options:

  • If a restore_point is specified and it doesn’t exist, then a new restore_point is created with the specified restore_point name. In this case, an additional input can be specified: either restore_until_scn or restore_until_time but not both.

  • If a restore_point is specified and that restore_point exists, then the user cannot specify any additional input parameters.

  • If the specified restore_until_time is not within the low_time and the high_time for the database, then this API returns an error

  • The restore_until_time is the time up to which backups are needed. You should specify the timezone of the database, because that's what is used to determine which backups are to be copied to tape. Similarly, the keep_until_time should also specify the timezone of the database.

  • If none of restore_until_scn, restore_until_time, or restore_point is specified, then archival backup is created by selecting the newest restorable backup within the past 14 days.

  • If restore_tag is already used to create archival backup for the specified db_unique_name database, this API returns an error.

Syntax

PROCEDURE CREATE_ARCHIVAL_BACKUP(
   db_unique_name IN VARCHAR2,
   from_tag IN VARCHAR2 DEFAULT NULL,
   compression_algorithm IN VARCHAR2 DEFAULT NULL,
   encryption_algorithm IN VARCHAR2 DEFAULT NULL,
   restore_point IN VARCHAR2 DEFAULT NULL,
   restore_until_scn      IN VARCHAR2 DEFAULT NULL,
   restore_until_time     IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
   attribute_set_name     IN VARCHAR2,
   format                 IN VARCHAR2 DEFAULT NULL,
   autobackup_prefix      IN VARCHAR2 DEFAULT NULL,
   restore_tag            IN VARCHAR2 DEFAULT NULL,
   keep_until_time        IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
   comments               IN VARCHAR2 DEFAULT NULL
   max_redo_to_apply      IN NUMBER DEFAULT NULL);

Parameters

Table 21-9 CREATE_ARCHIVAL_BACKUP Parameters

Parameter Description

db_unique_name

The DB_UNIQUE_NAME of the protected database. If this is not specified, or if the state of this database associated with this name is not valid, this API returns with an error.

from_tag

If specified, recovery appliance only considers backups using this tag for copying to tape. If invalid from_tag is specified, then API returns with an error.

compression_algorithm

If the backup is already compressed, this parameter is ignored, otherwise the output backup files will be compressed using specified algorithm. If invalid algorithm is specified, then API returns with an error.

BASIC: Good compression ratios with potentially lower speed than MEDIUM.

LOW: Optimized for speed with potentially lower compression raios than BASIC.

MEDIUM: Recommended for most environments. Good combination of compression ratios and speed.

HIGH: Best suited for operations over slower networks where the limiting factor is maximum network throughput. Provides the highest level of compression with the most negative impact on CPU performance.

OFF: No compression.

NULL: (default) existing value of compression algorithm is retained.

encryption_algorithm

If the backup is already encrypted, this parameter is ignored.

Otherwise the output backup files will be encrypted using specified algorithm.

Valid values are 'AES128', 'AES192', 'AES256', 'OFF', 'CLIENT', or the constant equivalents ENC_OFF, ENC_AES128, ENC_AES192, ENC_AES256, ENC_CLIENT.

Note:

A value of CLIENT or ENC_CLIENT requires the client to generate encrypted backups. Failure to do so will result in cloud backup job failures on the Recovery Appliance.

restore_point

User generated restore point name for which archival backups are created. If invalid restore point name is specified, this API returns an error..

restore_until_scn

User specified recovery SCN for which archival backups are created.

restore_until_time

User specified recovery time for which archival backups are created. Specify the timezone of the database.

attributre_set_name

User specified attribute set name. If an invalid attribute_set_name is specified, this returns an error.

format

The naming format of the output backup pieces. This parameter follows the same rules as the RMAN FORMAT parameter. If null, the default is defined by the queue_sbt_backup_task API.

autobackup_prefix

The original autobackup names will be given this prefix.

restore_tag

User specified tag for archival backups. If null, then tag values for archival backups will be the same as restore_point name.

keep_until_time

User specified retention time for the archival backup. If not specified, then the archival backup will be KEEP FOREVER backup. Specify the timezone of the database.

comments

Optional user supplied comment describing reason for executing this command.

max_redo_to_apply

User supplied parameter indicating the maximum number of days for which redo logs could be applied in order to create the archival backups.

If a restore_until_time is specified, a full backup of the database must exist in the time range [restore_until_time - max_redo_to_apply, restore_until_time].

If restore_until_scn or restore_point is specified, or if no parameters are specified, then the current time is used and a full backup must exist in the time range [SYSTIMESTAMP - max_redo_to_apply, SYSTIMESTAMP].

If no value has been provided for the parameter then max_redo_to_apply defaults to 14 days.