Customizing the Current Backup Configuration

How you customize the current backup configuration depends on the type of database running in the database deployment.

Customizing the Current Backup Configuration on Database Deployments Hosting Single-Instance Databases

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 by generating a file containing the current 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 the 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. Enter this bkup_api command to generate a file containing the current backup settings:

    # /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 will be 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 update in the current backup configuration. The following parameters are used to customize the current backup configuration:

    Parameter Description

    bkup_archlog_frequency

    Frequency of archivelog file backups expressed in hours.

    bkup_cfg_files

    Enable backup of configuration files. Valid values are yes and no.

    bkup_daily_time

    Time of the daily incremental backup expressed as hh:mm.

    bkup_disk_recovery_window

    Recovery window expressed in number of days between 1 and 14.

    bkup_oss_l0_day

    Day of Oracle Storage Cloud level 0 backup. Valid values are mon, tue, wed, thu, fri, sat, sun. Only applicable when bkup_oss is set to yes.

    bkup_oss_recovery_window

    Recovery window for backups to an Oracle Storage Cloud container, expressed in number of days between 1 and 30. Only applicable when bkup_oss is set to yes. Only applicable when bkup_oss is set to yes.

  5. Enter this bkup_api command to update the backup settings using the file you generated:

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

    where filename is used to specify a name for the file that will be used to update the backup settings and dbname is the database name for the database that you want to act on.

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

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

    # exit
    $

Any changes you make by using the bkup_api command are not reflected in the Oracle Database Classic Cloud Service console.

Customizing Which System Files Are Backed Up

To change which system files and directories are backed up:

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

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

  2. Edit the contents of the /home/oracle/bkup/oscfg.spec file.

    The backup feature provided by Oracle Database Classic Cloud Service backs up the files and folders listed in this specification file.

    An example of an oscfg.spec file with a default configuration is as follows:

    
    ## 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

To change which database configuration files are backed up:

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

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

  2. Edit the contents of the /home/oracle/bkup/dbcfg.spec file:

    The backup feature provided by Oracle Database Classic Cloud Service backs up the files and folders listed in this specification file.

    An example of a dbcfg.spec file with a default configuration is as follows:

    ### Oracle_Home configuration files.
    #
    # Doc Spec
    dbcfg.spec
    # DB id
    dbid
    #
    # Directories
    /u01/app/oracle/product/12.1.0/dbhome_1/admin/ORCL/xdb_wallet
    /u01/app/oracle/admin/ORCL/xdb_wallet
    /u01/app/oracle/admin/ORCL/opc_wallet
    # Note: tde_wallet must be backed up in a different location than DATA bkup.
    /u01/app/oracle/admin/ORCL/tde_wallet
    /u01/app/oracle/admin/ORCL/cat_wallet
    #/u01/app/oracle/product/12.1.0/dbhome_1/dbs
    #/u01/app/oracle/product/12.1.0/dbhome_1/network/admin
    #/u01/app/oraInventory
    #
    # Single files
    /u01/app/oracle/product/12.1.0/dbhome_1/dbs/opcORCL.ora
    /u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapworcl
    /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
    /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora
    /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
    /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk
    /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk
    

Customizing the Current Backup Configuration on Database Deployments Hosting Oracle RAC Databases

Not Oracle Cloud InfrastructureNot Oracle Cloud at Customer This topic does not apply to Oracle Cloud Infrastructure or to Oracle Cloud at Customer.

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

Customizing Which System Files Are Backed Up

To change which system files and directories are backed up:

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

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

  2. Edit the contents of the /opt/oracle/dcs/rdbaas/config/oscfg.spec file.

    The backup feature provided by Oracle Database Classic Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Database Configuration Files Are Backed Up

To change which database configuration files are backed up:

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

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

  2. Edit the contents of the /opt/oracle/dcs/rdbaas/config/dbcfg.spec file.

    The backup feature provided by Oracle Database Classic Cloud Service backs up the files and folders listed in this specification file.

Customizing Which Grid Infrastructure Configuration Files Are Backed Up

To change which grid infrastructure configuration files are backed up:

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

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

  2. Edit the contents of the /opt/oracle/dcs/rdbaas/config/gicfg.spec file.

    The backup feature provided by Oracle Database Classic Cloud Service backs up the files and folders listed in this specification file.

Customizing the Recovery Window for Backups to Local Storage

Note:

If you have used the update rdk subcommand of the raccli utility to update the cloud tooling to 16.4.5 or later, you must manually update the opc installer for the Oracle Database Cloud Backup Module before you use the update backupconfig subcommand. For instructions, see in Updating the cloud tooling on a deployment hosting Oracle RAC requires manual update of the Oracle Database Cloud Backup Module in Known Issues for Oracle Database Classic Cloud Service.

To change the recovery window for backups to local storage:

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

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

  2. Enter this raccli command:

    $ raccli update backupconfig -params '{"diskRecoveryWindow" : days}'
    

    where days is the number of days for which you want to retain backups.

Customizing the Recovery Window for Backups to Cloud Storage

Note:

If you have used the update rdk subcommand of the raccli utility to update the cloud tooling to 16.4.5 or later, you must manually update the opc installer for the Oracle Database Cloud Backup Module before you use the update backupconfig subcommand. For instructions, see in Updating the cloud tooling on a deployment hosting Oracle RAC requires manual update of the Oracle Database Cloud Backup Module in Known Issues for Oracle Database Classic Cloud Service.

To change the recovery window for backups to the Oracle Storage Cloud container:

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

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

  2. Enter this raccli command:

    $ raccli update backupconfig -params '{"ossRecoveryWindow" : days}'
    

    where days is the number of days for which you want to retain backups.

Customizing the Time of Automatic Daily Backups

Note:

If you have used the update rdk subcommand of the raccli utility to update the cloud tooling to 16.4.5 or later, you must manually update the opc installer for the Oracle Database Cloud Backup Module before you use the update backupconfig subcommand. For instructions, see in Updating the cloud tooling on a deployment hosting Oracle RAC requires manual update of the Oracle Database Cloud Backup Module in Known Issues for Oracle Database Classic Cloud Service.

To change the time of day when daily automatic backups are performed:

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

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

  2. Enter this raccli command:

    $ raccli update backupconfig -params '{"cronDate" : "time"}'
    

    where time is the time (using 24-hour, HH:MM format) when daily backups are to occur. For example, "02:45" is 2:45 AM, and "14:45" is 2:45 PM.