Backup types
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
https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MyRACBKP
Backup configuration
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
Retention period:
– Both Cloud Storage and Local Storage: 30 days, with the 7 most recent days’ backups available on local storage
– Cloud Storage Only: 30 days
Encryption:
– 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
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : get_config_info
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
{
“bkup_cfg_db_spec”: “dbcfg.spec”,
“bkup_cfg_files”: “yes”,
“bkup_cfg_os_spec”: “oscfg.spec”,
“bkup_cfg_recovery_window”: “30”,
“bkup_cron_entry”: “yes”,
“bkup_daily_time”: “2:53”,
“bkup_disk”: “yes”,
“bkup_disk_recovery_window”: “7”,
“bkup_nfs_mount_dir”: “/mnt/dbaas_backup”,
“bkup_oss”: “yes”,
“bkup_oss_recovery_window”: “30”,
“bkup_oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYRACBKP”,
“bkup_oss_user”: “rsurajit@rediffmail.com”,
“bkup_rman_retention”: “8”,
“bkup_script_loc”: “/home/oracle/bkup/ORCL”,
“bkup_type”: “diskoss”,
“fra_loc”: “/u03/app/oracle/fast_recovery_area”,
“opc_oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld”,
“oss_base”: “MYRACBKP”,
“oss_url”: “https://surcloudworld.au.storage.oraclecloud.com/v1/Storage-surcloudworld/MYRACBKP”,
“oss_user”: “rsurajit@rediffmail.com”
}
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
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : bkup_start
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
UUID 0a9b991c-3bb6-11e8-a931-021ff53ddc9b for this backup
** process started with PID: 29350
** see log file for monitor progress
————————————-
Mon, 09 Apr 2018 05:28:55 -> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
Mon, 09 Apr 2018 05:28:55 -> Listing all backups
Mon, 09 Apr 2018 05:28:55 Backup Tag Completion Date (UTC) Type keep
Mon, 09 Apr 2018 05:28:55 ———————- ———————– ———– ——–
Mon, 09 Apr 2018 05:28:55 TAG20180403T025607 04/03/2018 02:56:07 incremental False
Mon, 09 Apr 2018 05:28:59 API::7238:: Backup list synchronization in background.
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
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : list
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
-> Listing all backups
Backup Tag Completion Date (UTC) Type keep
———————- ———————– ———– ——–
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api list
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : list
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
-> Listing all backups
Backup Tag Completion Date (UTC) Type keep
———————- ———————– ———– ——–
TAG20180409T051640 04/09/2018 05:16:40 incremental False
TAG20180409T052528 04/09/2018 05:25:28 incremental False
Delete backup with tag
[root@MYTST ~]# /var/opt/oracle/bkup_api/bkup_api bkup_delete –bkup=TAG20180409T051640
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : bkup_delete
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
UUID 841a5e78-3bdd-11e8-bc4d-021ff53ddc9b for delete backup
Notes:
*) Only keep forever backups can be deleted
*) Regular backups are part of the retention policy
*) Regular backups are hot and incremental and they share their backup pieces
-> Verifying if the specified backup is a keep forever backup
Starting delete of backup
841a5e78-3bdd-11e8-bc4d-021ff53ddc9b command /var/opt/oracle/ocde/assistants/bkup/obkup -keep -delete=TAG20180409T051640
841a5e78-3bdd-11e8-bc4d-021ff53ddc9b The delete process failed
*
* RETURN CODE:1
##################################################
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.
RMAN> show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
#/var/opt/oracle/bkup_api/bkup_api bkup_chgcfg –retention=15
INFO: Backups that are older than 15 days will be deleted during next bkup.
* Update
INFO: Updating the policy with the following parameters:
-> Backup policy : 15 days (rman retention period)
-> Backup cycle : 8 days (obkup retention period)
INFO: Update RMAN retention policy:
-> configure retention policy to recovery window of 30 days;
-> New value: 15 days
INFO: Update bkup_oss_recovery_window:
-> Old value: 30 days
-> New value: 15 days
I* RETURN CODE: 0
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:
# 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
Please edit /home/oracle/bkup/ORCL/dbcfg.spec using oracle user
# 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/db_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
# Single files
/u01/app/oracle/admin/ORCL/opcORCL.ora
/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
# Creg
/var/opt/oracle/creg/ORCL.ini
The backup feature provided uses the Linux cron job scheduler to perform automatic backups
[root@MYTST ORCL]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=””
HOME=/
# 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
15 03 * * 6 oracle /var/opt/oracle/cleandb/cleandblogs.pl
53 2 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start –dbname=ORCL
0,30 * * * * root /var/opt/oracle/bkup_api/bkup_api bkup_archlogs –dbname=ORCL
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