configure_db_ha -configureCloudBackup

Configures one or more databases to send backups to Database Backup Cloud Service. If necessary, installs the Database Cloud Backup Module in the database Oracle homes.

Format

emcli configure_db_ha –configureCloudBackup
	(
	 (–target_name="<database target name>" –target_type="oracle_database|rac_database")
	 | input_file="target_list:<full pathname of input file>"
	)
	[–cloud_account="<Database Backup Cloud Service account name>"]   
	[–db_cred="<database named credential>"]     
	[–db_host_cred="<database host named credential>"]
 	[–force_backup_module_install]
	[–staging_directory=”<full pathname where Backup Module will be staged on database host>"]
	[[-schedule=    
		{        
	 	start_time:yyyy/MM/dd HH:mm;
	        tz:{java timezone ID};
	        frequency:interval/weekly/monthly/yearly;
	        repeat:#m|#h|#d|#w;
	        months:#,#,...;
	        days:#,#,...;
	        end_time:yyyy/MM/dd HH:mm;           
		}]  
[ ]  indicates that the parameter is optional.

Options

  • target_name

    The target name of a single-instance or cluster database. A multi-database operation can be performed by using the –input_file option instead of –target_name/–target_type.

  • target_type

    The type of the target specified by –target_name, either a single–instance database (oracle_database) or a cluster database (rac_database).

  • input_file

    The file containing the information for each database that is to be configured. This option is an alternative to –target_name/–target_type. The target_name and target_type lines are required for each database. The db_cred and db_host_cred lines are optional; if these are present for a database, they override the command-line named credential settings (if any) for that database. The format of the file is as follows:

    target.0.target_name=<database #1 target name>
    target.0.target_type=oracle_database|rac_database
    target.0.db_cred=<database named credential for database #1>
    target.0.db_host_cred=<database host named credential for database #1>
    target.1.target_name=<database #1 target name>
    target.1.target_type=oracle_database|rac_database
    target.1.db_cred=<database named credential for database #2>
    target.1.db_host_cred=<database host named credential for database #2> 
  • cloud_account

    The name of a cloud account configured under the Enterprise Manager Hybrid Cloud Setup console. All the information that is needed to connect to the Backup Service will be obtained from this account and its associated Backup Service settings, including the service name, identity domain, username, password, and container (optional). If this argument is not specified, the global cloud account settings configured in the Database Backup Cloud Service Settings page will be used. (This argument is applicable only if the Hybrid Cloud Setup console has been used to configure accounts and Backup Service settings).

  • db_cred
    The name of an existing Enterprise Manager database named credential that can be used to connect to all the specified target databases. If this argument is not specified, preferred credentials will be used. If multiple databases are specified, this should be a global named credential.

    Note:

    If the -input_file option is used, this option can be optionally overridden for individual databases.
  • db_host_cred
    The name of an existing Enterprise Manager database host credential that has been created against the Database Instance or Cluster Database target type, (rather than the Host target type) that can be used to run operating system commands on the specified target database hosts. The credential should be for a user that has write permission for all Oracle Homes. If this argument is not specified, preferred credentials will be used. If multiple databases are specified, this should be a global named credential.

    Note:

    If the -input_file option is used, this option can be optionally overridden for individual databases.
  • force_backup_module_install

    Install the version of the Oracle Database Cloud Backup Module stored in the Enterprise Manager Software Library into the Oracle Homes of the specified target databases, even if an existing Backup Module has already been installed in the Oracle Homes. Since this option overwrites any existing Backup Module, select this option only if the Backup Module version in the Software Library is at the same or later version than the version installed on all the specified target databases. If this flag is not specified, the Backup Module will be installed only if there is no existing Backup Module present in the Oracle Home.

  • staging_directory

    The directory where the Backup Module installation files will be staged on the database hosts. This directory must exist on all hosts. A temporary subdirectory will be created in this location, then deleted after the installation of the Backup Module and/or file system backup agent is complete. The default directory is <Agent installation root>/EMStage.

  • schedule
    Schedule the deployment procedure. If this argument is not provided, the procedure will run immediately. Default value will schedule the procedure for immediate execution.
    • start_time: Time when the procedure has to start execution. The format should be "yyyy/MM/dd HH:mm"
    • tz: The timezone ID (optional)
    • frequency: Valid values are once/interval/weekly/monthly/yearly. If frequency is set to interval then repeat has to be specified. If frequency is set to yearly, both day and month have to specified.
    • repeat: Frequency with which the procedure has to be repeated. (Required only if frequency is set to interval)
    • days: A comma separated list of days. Required for weekly, monthly, or yearly frequency, if frequency is weekly the valid range is 1 to 7, If frequency is monthly or yearly the valid range is 1 to 30.
    • months: Comma separated list of months. Required only if frequency is yearly, valid range is 1 to 12.
    • end_time: End time for procedure executions. If it is not specified, the procedure will run indefinitely. Format should be "yyyy/MM/dd HH:mm"
    :
Example 1

The following example configures a single-instance database “Finance” to send backups to Database Backup Cloud Service. It does not install the Backup Module if the module is already installed. This example uses named database and host credentials:

	emcli configure_db_ha –configureCloudBackup
	–target_name="Finance" –target_type="oracle_database"
	–db_cred="DB_USER" –db_host_cred="DB_HOST_USER"
Example 2

The following example configures a cluster database “Finance” to send backups to Database Backup Cloud Service. It performs a forced installation of the Backup Module in the Oracle Home of each cluster database instance. This example uses preferred database and host credentials:

	emcli configure_db_ha –configureCloudBackup
	–target_name="Finance" –target_type="rac_database" 
	–force_backup_module_install
Example 3

The following example configures the databases specified in the input file “/tmp/dblist” to send backups to Database Backup Cloud Service. It performs a forced installation of the Backup Module in the Oracle Home of each database. The backup module installation files are staged in a custom directory location (/tmp/stage). This example uses named database and database host credentials.

	emcli configure_db_ha –configureCloudBackup 
	–input_file="target_list:/tmp/dblist"
	-db_cred=”DB_USER” –db_host_cred="DB_HOST_USER" –force_backup_module_install 
	–staging_directory=”/tmp/stage"