You can customize many of the characteristics of a service instance’s current backup configuration.
Topics
• Customizing How the Database Is Backed Up
• Customizing Which System Files Are Backed Up
• Customizing Which Database Configuration Files Are Backed Up
• Customizing the Retention Period for Backups
• Customizing the Cycle Period for Backups
• Customizing the Frequency of Automatic Backups Customizing How the Database Is Backed Up
To change how the Oracle database is backed up, you use the RMAN utility. For information about using RMAN, see Oracle Database 12c Backup and Recovery User's Guide or Oracle Database 11g Backup and Recovery User's Guide.
Caution:
Do not use the RMAN utility to change the retention period.
To view the current RMAN configuration, use the RMAN command SHOW ALL:
1. Connect as the oracle user to the compute node.
For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH).
2. Start an RMAN session: $ rman target=/
... RMAN>
3. Enter the SHOW ALL command: RMAN> show all;
...
A listing of your configuration is displayed.
4. Use RMAN commands to make any changes to your configuration. 5. Exit the RMAN session:
RMAN> exit; $
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 Cloud - Database as a 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 Cloud - Database as a 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. Customizing the Current Backup Configuration
/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 Retention Period for Backups
To change the retention period for backups, use the bkup_api utility:
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.
# /var/opt/oracle/bkup_api/bkup_api bkup_chgcfg --retention_days=days
where days is the number of days for which you want to retain backups. 4. Exit the root-user command shell:
# exit $
Customizing the Cycle Period for Backups
To change the cycle period for backups, use the bkup_api utility:
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.
# /var/opt/oracle/bkup_api/bkup_api bkup_chgcfg --bkup_cycle=days
where days is the number of days you want for the cycle period. 4. Exit the root-user command shell:
# exit $
Customizing the Frequency of Automatic Backups
The backup feature provided by Oracle Database Cloud - Database as a Service uses the Linux cron job scheduler to perform automatic backups.
If automatic backups are enabled, the following job entry is defined:
01 01 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start
This entry causes the bkup_api script to be run daily at 1:01 AM by the root user.
The bkup_api script sends log messages to the file /home/oracle/bkup/log/ obkup.log.
To change this frequency, or to add the entry if automatic backups were not enabled when the service instance was created, use the crontab -e command. You must be
logged in as the root user to use this command.