When you create a database deployment, you choose one of the following backup destinations:
- Both Cloud Storage and Local Storage. Backups are configured to be created automatically and stored both on local compute node storage and on an Oracle Storage Cloud Service container.
- Cloud Storage Only. Backups are configured to be created automatically and stored on an Oracle Storage Cloud Service container.
Note:This choice is not currently available for database deployments that use Oracle Real Application Clusters (Oracle RAC).
- None. No backup configuration is created.
Identify backup location from storage classic section
Please select “Storage Classic” section from customize dashboard
Please note REST end point
Please open service console after login to cloud account
Create the container
The storage container end point will look as below
The backup configuration created when you choose a destination other than None follows a set of Oracle best-practice guidelines:
- Full (level 0) backup of the database followed by rolling incremental (level 1) backups on a seven-day cycle (a 30-day cycle for the Cloud Storage Only destination)
- Full backup of selected database configuration files.
- Full backup of selected system files.
- Automatic backups daily at a time between 11 PM (23:00) and 3 AM (03:00), with the specific time set during the database deployment creation process.
Retention period and Encryption in backup
– Both Cloud Storage and Local Storage: 30 days, with the 7 most recent days’ backups available on local storage
– Cloud Storage Only: 30 days
– Both Cloud Storage and Local Storage: All backups to cloud storage are encrypted; backups of Enterprise Edition databases to local storage are encrypted; backups of Standard Edition databases to local storage are not encrypted.
– Cloud Storage Only: All backups to cloud storage are encrypted.
How to get existing backup configuration
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api get_config_info –all
Checking latest backup from DB console
Taking ad hoc backup
Make a selection for the Keep Forever option and then click Backup.
The Keep Forever option controls the backup retention policy, as follows:
- No — specifies that the backup is produced and maintained in accordance with the automatic backup retention policy that is associated with the database deployment.
- Yes — specifies that the backup is a long-term backup, which is produced and maintained independently of the automatic backup retention policy that is associated with the database deployment.
Long-term backups remain until you explicitly remove them from the system.
Start backup using command line
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_start
Mon, 09 Apr 2018 05:28:55 -> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
Mon, 09 Apr 2018 05:29:08 API::7238:: Backup list synchronization completed.
Backup status check from command line
To create a long-term backup that persists until you delete it, enter the following bkup_api command:
# /var/opt/oracle/bkup_api/bkup_api bkup_start –keep
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_status
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : bkup_status
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
Warning: unable to get current configuration of: catalog
* Current backup settings:
* Last registered Bkup: 04-09 05:23 API::29350:: Starting dbaas backup process
* Bkup state: finished
Listing all backup
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api list –keep
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api list
Delete backup with tag
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_delete –bkup=TAG20180409T051640
Updating the Password by Using the bkup_api Utility
You use the bkup_api utility to update the Oracle Wallet file containing the backup user’s password:
- Connect to the compute node as the opc user.
- Start a root-user command shell: $ sudo -s
- Create a file that contains the updated password. The file must contain only the following entry: password=new-password (where new-password is the backup user’s updated password).
Also, the file permissions must be set as follows:
# chmod 600 password-file (where password-file is the name of the file that contains the updated password.)
- Update the password. # /var/opt/oracle/bkup_api/bkup_api update_wallet –cfg=password-file where password-file is the name of the file that contains the updated password.
Checking retention period of backup and changing it.
Customizing which system files are backed up
Login to oracle user and Edit the contents of the /home/oracle/bkup/ORCL/oscfg.spec file. The backup feature provided by Oracle Database 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:
# Single files
Customizing Which Database Configuration Files Are Backed Up
Please edit /home/oracle/bkup/ORCL/dbcfg.spec using oracle user
# Note: tde_wallet must be backed up in a different location than DATA bkup.
# Single files
The backup feature provided uses the Linux cron job scheduler to perform automatic backups
[root@MYTST ORCL]# cat /etc/crontab
# For details see man 4 crontabs
# Example of job definition:
# .—————- minute (0 – 59)
# | .————- hour (0 – 23)
# | | .———- day of month (1 – 31)
# | | | .——- month (1 – 12) OR jan,feb,mar,apr …
# | | | | .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
Disabling and Enabling automatic backup
If some activity you want to perform requires you to temporarily disable regularly scheduled backups of a database deployment, you can do so by removing the scheduling information from the system-wide /etc/crontab file.
Currently, disabling and re-enabling scheduled backups is not supported for Database Cloud Service database deployments that use Oracle Real Application Clusters (RAC).
- Start a root-user command shell: $ sudo -s #
- Navigate to the /etc directory, which contains the system-wide crontab file: # cd /etc.
- Make a copy of the crontab file to preserve the configuration, for example: # cp crontab crontab.bak.
- Edit the original crontab file and remove the lines related to backup from the file.
To re-enable automatic backup , Copy the crontab.bak file you created when disabling scheduled backups to its original name,
# cp /etc/crontab.bak /etc/crontab