Skip to main content
BlueXP backup and recovery
All cloud providers
  • Amazon Web Services
  • Google Cloud
  • Microsoft Azure
  • All cloud providers

Clone concepts and requirements

Contributors netapp-soumikd

You can clone an Oracle database residing on Amazon FSx for NetApp ONTAP or Cloud Volumes ONTAP using the backup of the database either to the source database host or to an alternate host. You can clone the backup from primary storage systems.

Before cloning the database, you should understand the clone concepts and ensure that all the requirements are met.

Requirements for cloning an Oracle database

Before cloning an Oracle database, you should ensure that prerequisites are completed.

  • You should have created a backup of the database.
    You should have successfully created online data and log backup for the cloning operation to succeed.

  • In the asm_diskstring parameter, you should configure:

    • AFD:* if you are using ASMFD

    • ORCL:* if you are using ASMLIB

    • /dev/<exact_device_location> if you are using ASMUDEV

  • If you are creating the clone on an alternate host, the alternate host should meet the following requirements:

    • The plug-in should be installed on the alternate host.

    • Oracle software should be installed on the alternate host.

    • The clone host should be able to discover LUNs from storage if you are cloning a database residing on iSCSI SAN storage.
      If you are cloning to an alternate host, then make sure that an iSCSI session is established between the storage and the alternate host.

    • If the source database is an ASM database:

      • The ASM instance should be up and running on the host where the clone will be performed.

      • The ASM diskgroup should be provisioned prior to the clone operation if you want to place archive log files of the cloned database in a dedicated ASM diskgroup.

      • The name of the data diskgroup can be configured but ensure that the name is not used by any other ASM diskgroup on the host where the clone will be performed.

      • Data files residing on the ASM diskgroup are provisioned as part of the clone workflow.

Limitations

  • Cloning of databases residing on Azure NetApp Files is not supported.

  • Cloning of databases residing on Qtree is not supported.

  • Backing up a cloned database is not supported.

  • If daily automatic backups are enabled on Amazon FSx for NetApp ONTAP, the cloned volumes on Amazon FSx for NetApp ONTAP cannot be deleted from BlueXP UI because FSx would have created backups on the cloned volumes.
    You should delete the cloned volumes after deleting all the backups for the volume from FSx UI and then delete the clones from the BlueXP UI using force option.

Clone methods

You can create clone either using the basic method or using the clone specification file.

Clone using basic method

You can create the clone with the default configurations based on the source database and the selected backup.

  • The database parameters, home, and OS user are defaulted to the source database.

  • The data file paths are named based on the naming scheme selected.

  • The pre-script, post-script, and SQL statements cannot be specified.

  • The recovery option is by default until cancel and it uses the log backup associated with the data backup for recovery

Clone using specification file

You can define the configurations in the clone specification file and use it to clone the database. You can download the specification file, modify it to your requirement, and then upload the file. Learn more.

The different parameters defined in the specification file and that can be modified are as follows:

Parameter Description

control_files

Location of control files for the clone database.

The number of control files will be same as source database.
If you want to override the control file path, you can provide a different control file path. The file system or the ASM diskgroup should exist on the host.

redo_logs

Location, size, redo group number of redo logs.

A minimum of two redo log groups are required to clone the database. If you want to override the redo log file path, you can customize the redo log file path to a different file system than that of the source database.The file system or the ASM diskgroup should exist on the host.

oracle_version

Version of Oracle on the target host.

oracle_home

Oracle home on the target host.

enable_archive_log_mode

Controls the archive log mode for the clone database

database_parameters

Database parameters for the cloned database

sql_statements

The SQL statements to be executed on the database after cloning

os_user_detail

Oracle OS user on the target clone database

database_port

Port used for communicating with the database if OS authentication is disabled on the host.

asm_port

Port used for communicating with ASM database if credentials are provided in the create clone input.

skip_recovery

Does not perform recovery operation.

until_scn

Recovers the database up to the specified system change number (scn).

until_time

Recovers the database up to the specified date and time.

The accepted format is mm/dd/yyyy hh:mm:ss.

until_cancel

Recovers by mounting the log backup associated with the data backup that was selected for cloning.

The cloned database is recovered till the missing or corrupt log file.

log_paths

Additional locations of archive log paths to be used for recovering the cloned database.

source_location

Location of the diskgroup or mount point on the source database host.

clone_location

Location of the diskgroup or mount point that needs to be created on the target host corresponding to the source location.

location_type

It can be either ASM_Diskgroup Or mountpoint.

The values are auto-populated at the time of downloading the file. You should not edit this parameter.

pre_script

Script to be executed on the target host before creating the clone.

post_script

Script to be executed on the target host after creating the clone.

path

Absolute Path of the script on the clone host.

You should store the script either in /var/opt/snapcenter/spl/scripts or in any folder inside this path.

timeout

The timeout time specified for the script running on the target host.

arguments

Arguments specified for the scripts.

Clone naming scheme

Clone naming scheme defines what will be the location of the mount points and name of the diskgroups of the cloned database. You can either select Identical or Auto-generated.

Identical naming scheme

If you select the clone naming scheme as Identical, the location of mount points and the name of the diskgroups of the cloned database will be same as the source database.

For example, if the mount point of the source database is /netapp_sourcedb/data_1 , +DATA1_DG, for the cloned database the mount point remains the same for both NFS and ASM on SAN.

  • Configurations like number and path of control files and redo files will be same as source.

    Note If the redo logs or control file paths are located on the non-data volumes, then the user should have provisioned the ASM diskgroup or mountpoint in the target host.
  • Oracle OS user and Oracle version will be same as source database.

  • Clone storage volume name will be in the following format sourceVolNameSCS_Clone_CurrentTimeStampNumber.

    For example, if the volume name on the source database is sourceVolName, the cloned volume name will be sourceVolNameSCS_Clone_1661420020304608825.

    Note The CurrentTimeStampNumber provides the uniqueness in volume name.

Auto-generated naming scheme

If you select the cloning scheme as Auto-generated, the location of mount points and the name of the diskgroups of the cloned database will be appended with a suffix.

  • If you have selected the basic clone method, the suffixed will be the Clone SID.

  • If you have selected the specification file method, the suffix will be the Suffix that was specified while downloading the clone specification file.

For example, if the mount point of the source database is /netapp_sourcedb/data_1 and the Clone SID or the Suffix is HR, then the mount point of the cloned database will be /netapp_sourcedb/data_1_HR.

  • Number of control files and redo log files will be same as the source.

  • All redo log files and control files will be located on one of the cloned data mount points or data ASM diskgroups.

  • Clone storage volume name will be in the following format sourceVolNameSCS_Clone_CurrentTimeStampNumber.

    For example, if the volume name on the source database is sourceVolName, the cloned volume name will be sourceVolNameSCS_Clone_1661420020304608825.

    Note The CurrentTimeStampNumber provides the uniqueness in volume name.
  • The format of the NAS mount point will be SourceNASMountPoint_suffix.

  • The format of the ASM diskgroup will be SourceDiskgroup_suffix.

    Note If the number of characters in the clone diskgroup is greater than 25 then it will have SC_HashCode_suffix.

Database parameters

The value of the following database parameters will be same as that of the source database irrespective of the clone naming scheme.

  • log_archive_format

  • audit_trail

  • processes

  • pga_aggregate_target

  • remote_login_passwordfile

  • undo_tablespace

  • open_cursors

  • sga_target

  • db_block_size

The value of the following database parameters will be appended with a suffix based on the clone SID.

  • audit_file_dest = {sourcedatabase_parametervalue}_suffix

  • log_archive_dest_1 = {sourcedatabase_oraclehome}_suffix

Supported predefined environment variables for clone specific prescript and postscript

You can use the supported predefined environment variables when you execute the prescript and postscript while cloning a database.

  • SC_ORIGINAL_SID specifies the SID of the source database.
    This parameter will be populated for application volumes. Example: NFSB32

  • SC_ORIGINAL_HOST specifies the name of the source host.
    This parameter will be populated for application volumes. Example: asmrac1.gdl.englab.netapp.com

  • SC_ORACLE_HOME specifies the path of the target database’s Oracle home directory.
    Example: /ora01/app/oracle/product/18.1.0/db_1

  • SC_BACKUP_NAME specifies the name of the backup.
    This parameter will be populated for application volumes. Examples:

    • If the database is not running in ARCHIVELOG mode: DATA@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_0|LOG@RG2_scspr2417819002_07-20-2021_12.16.48.9267_1

    • If the database is running in ARCHIVELOG mode: DATA@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_0|LOG@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_1,RG2_scspr2417819002_07-21- 2021_12.16.48.9267_1,RG2_scspr2417819002_07-22-2021_12.16.48.9267_1

  • SC_ORIGINAL_OS_USER specifies the operating system owner of the source database.
    Example: oracle

  • SC_ORIGINAL_OS_GROUP specifies the operating system group of the source database.
    Example: oinstall

  • SC_TARGET_SID specifies the SID of the cloned database.
    For PDB clone workflow, the value of this parameter will not be predefined. This parameter will be populated for application volumes.
    Example: clonedb

  • SC_TARGET_HOST specifies the name of the host where the database will be cloned.
    This parameter will be populated for application volumes. Example: asmrac1.gdl.englab.netapp.com

  • SC_TARGET_OS_USER specifies the operating system owner of the cloned database.
    For PDB clone workflow, the value of this parameter will not be predefined. Example: oracle

  • SC_TARGET_OS_GROUP specifies the operating system group of the cloned database.
    For PDB clone workflow, the value of this parameter will not be predefined. Example: oinstall

  • SC_TARGET_DB_PORT specifies the database port of the cloned database.
    For PDB clone workflow, the value of this parameter will not be predefined. Example: 1521

Supported delimiters

  • @ is used to separate data from its database name and to separate the value from its key.
    Example: DATA@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_0|LOG@RG2_scspr2417819002_07-20-2021_12.16.48.9267_1

  • | is used to separate the data between two different entities for SC_BACKUP_NAME parameter.
    Example: DATA@RG2_scspr2417819002_07-20-2021_12.16.48.9267_0|LOG@RG2_scspr2417819002_07-20-2021_12.16.48.9267_1

  • , is used to separate set of variables for the same key.
    Example: DATA@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_0|LOG@RG2_scspr2417819002_07-20- 2021_12.16.48.9267_1,RG2_scspr2417819002_07-21- 2021_12.16.48.9267_1,RG2_scspr2417819002_07-22-2021_12.16.48.9267_1