Customizing the Automatic Backup Configuration

You can customize many of the characteristics of the automatic backup configuration.

Customizing Backup Settings by Using a Generated Configuration File

You can customize backup settings for a database deployment by generating a file containing the current customizable settings, editing the file, and then using the file to update the backup settings.

To generate a configuration file with the current backup settings and use it to update the settings:

  1. Connect as the opc user to a compute node.

    For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH).

  2. Start a root-user command shell:

    $ sudo -s
    #
  3. Use the bkup_api get config command to generate a file containing the current backup settings for the database deployment:

    # /var/opt/oracle/bkup_api/bkup_api get config [--file=filename] --dbname=dbname
    

    where filename is an optional parameter used to specify a name for the file that is generated and dbname is the database name for the database that you want to act on.

  4. Edit the parameter values in the generated file to change any settings you want to customize in the backup configuration.

    The following parameters can be modified to customize the backup configuration:

    Parameter Description

    bkup_cron_entry

    Enables the automatic backup configuration. Valid values are yes and no.

    bkup_cfg_files

    Enables backup of system and database configuration files. Valid values are yes and no.

    bkup_daily_time

    Start time of the automatic daily backup expressed in 24-hour time as hh:mm.

    bkup_archlog_cron_entry

    Enables automatic backups of archived database log files. Valid values are yes and no. Default value is yes.

    Setting bkup_archlog_cron_entry to no disables automatic archive log clean-up jobs. This setting is valid only when the associated database has no automatic database backups configured.

    bkup_archlog_frequency

    Interval in minutes between automatic backups of archived database log files. Valid values are 15, 20, 30, 60, and 120. Default value is 60.

    bkup_disk

    Enables backups to local Exadata storage. Valid values are yes and no.

    bkup_disk_recovery_window

    Retention period for backups on local Exadata storage, expressed as a number of days up to 14. Only applicable when bkup_disk is set to yes. Default value is 7.

    bkup_oss

    Enables backups to cloud storage. Valid values are yes and no.

    bkup_oss_recovery_window

    Retention period for backups to cloud storage, expressed as a number of days up to 90. Only applicable when bkup_oss is set to yes. Default value is 30.

    bkup_oss_url

    Location of the storage container that is used for backup to cloud storage. Only applicable when bkup_oss is set to yes.

    bkup_oss_user

    User name of the Oracle Cloud user having write privileges on the cloud storage container specified in bkup_oss_url. Only applicable when bkup_oss is set to yes.

    bkup_oss_passwd

    Password of the Oracle Cloud user having write privileges on the cloud storage container specified in bkup_oss_url. Only applicable when bkup_oss is set to yes.

    bkup_oss_l0_day

    Day of the week when a level 0 backup is taken and stored on cloud storage. Valid values are mon, tue, wed, thu, fri, sat, sun. Only applicable when bkup_oss is set to yes. Default value is sun.

    bkup_rman_compression

    Level of compression applied to automatic backups. Valid values are basic, low, medium, and high. Default value is low.

    bkup_set_section_size

    Enables the use of the RMAN multisection backup feature. Valid values are yes and no.

    bkup_section_size

    RMAN section size that is used for automatic backups. Default value is 64G. Only applicable when bkup_set_section_size is set to yes.

    bkup_channels_node

    Number of RMAN channels that are used for automatic backups. Valid values are between 1 and 32. Default value is 4.

    bkup_use_rcat

    Enables the use of an existing RMAN recovery catalog. Valid values are yes and no.

    bkup_rcat_user

    Recovery catalog user name. Only applicable when bkup_use_rcat is set to yes.

    bkup_rcat_passwd

    Password for recovery catalog user specified in bkup_rcat_user. Only applicable when bkup_use_rcat is set to yes.

    bkup_rcat_conn

    Connection string for the RMAN recovery catalog. Only applicable when bkup_use_rcat is set to yes.

  5. Use the bkup_api set config command to update the backup settings using the file containing your updated backup settings:

    # /var/opt/oracle/bkup_api/bkup_api set config --file=filename --dbname=dbname
    

    where filename is used to specify the name of the file that contains the updated backup settings and dbname is the database name for the database that you are acting on.

  6. You can use the bkup_api configure_status command to check the status of the configuration update:

    # /var/opt/oracle/bkup_api/bkup_api configure_status
    
  7. Exit the root-user command shell:

    # exit
    $

Note that any changes you make by using the bkup_api command are not reflected in the Oracle Database Exadata Cloud Service console.

Customizing Which System Files Are Backed Up

If your backup configuration includes bkup_cfg_files=yes, then each backup includes system configuration files and directories specified in the oscfg.spec file.

To change which system files and directories are backed up:

  1. Connect as the oracle user to a compute node.

    For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH).

  2. Edit the contents of the oscfg.spec file. This file is located under /var/opt/oracle/dbaas_acfs/bkup/dbname, where dbname is the name of the database that is associated with the backup configuration.

    Following is an example of the default contents of the oscfg.spec file:

    ## OS Configuration Files
    #
    # Doc Spec
    oscfg.spec
    #
    # Directories
    /etc/rc.d
    /home/oracle/bkup
    #
    # Single files
    /home/oracle/.bashrc
    /etc/crontab
    /etc/sysctl.conf
    /etc/passwd
    /etc/group
    /etc/oraInst.loc
    /etc/oratab
    /etc/fstab
    

Customizing Which Database Configuration Files Are Backed Up

If your backup configuration includes bkup_cfg_files=yes, then each backup includes database configuration files and directories specified in the dbcfg.spec file.

To change which database configuration files are backed up:

  1. Connect as the oracle user to a compute node.

    For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH).

  2. Edit the contents of the dbcfg.spec file. This file is located under /var/opt/oracle/dbaas_acfs/bkup/dbname, where dbname is the name of the database that is associated with the backup configuration.

    Following is an example of the contents of the dbcfg.spec file:

    ### Oracle_Home configuration files.
    #
    # Doc Spec
    dbcfg.spec
    # DB id
    dbid
    #
    # Directories
    /u02/app/oracle/product/dbversion/dbhome_n/admin/dbname/xdb_wallet
    /u02/app/oracle/admin/dbname/xdb_wallet
    /u02/app/oracle/admin/dbname/db_wallet
    # Note: tde_wallet must be backed up in a different location than DATA bkup.
    /u02/app/oracle/admin/dbname/tde_wallet
    /u02/app/oracle/admin/dbname/cat_wallet
    #/u01/app/oraInventory
    #
    # Single files
    /var/opt/oracle/dbaas_acfs/dbname/opc/opcdbname.ora
    /u02/app/oracle/product/dbversion/dbhome_n/dbs/opcdbname.ora
    /u02/app/oracle/product/dbversion/dbhome_n/dbs/orapwinstancename
    /u02/app/oracle/product/dbversion/dbhome_n/network/admin/listener.ora
    /u02/app/oracle/product/dbversion/dbhome_n/network/admin/sqlnet.ora
    /u02/app/oracle/product/dbversion/dbhome_n/network/admin/tnsnames.ora
    /u02/app/oracle/product/dbversion/dbhome_n/rdbms/lib/env_rdbms.mk
    /u02/app/oracle/product/dbversion/dbhome_n/rdbms/lib/ins_rdbms.mk
    #
    # Creg
    /var/opt/oracle/creg/instancename.ini
    #