Backing Up and Restoring Databases on Oracle Database 18c Cloud Service
Description:-
- In this article we are going to see enabling Rman backup on Oracle 18cR2 Cloud Service.
- On-demand backup can be performed by running script “/var/opt/oracle/bkup_api/bkup_api bkup_start” as the root user
Step1:- Login in to root user and run the backup script
/var/opt/oracle/bkup_api/bkup_api bkup_start
Step2:- Pre-steps to Configure the Rman backup
Backup configuration is saved in file /var/opt/oracle/ocde/assistants/bkup/bkup.cfg. Let’s edit the file and add required parameters.
cd /var/opt/oracle/ocde/assistants/bkup
Step3:- Configure the Rman backup
vi bkup.cfg
bkup_cfg_files=yes
bkup_disk=yes
bkup_disk_recovery_window=2
bkup_oss=no
bkup_oss_url=oss_url
bkup_oss_user=username
bkup_oss_passwd=password
bkup_oss_recovery_window=30
Step4:- Change the permission
[root@oracle18c bkup]# chown root bkup.cfg
[root@oracle18c bkup]# chmod 0600 bkup.cfg
Step5:-Execute the bkup.cfg
[root@oracle18c bkup]# ./bkup -cfg bkup.cfg
Starting BKUP
Logfile is /var/opt/oracle/log/bkup/bkup_2018-06-18_15:56:15.log
Config file is bkup.cfg
dbname: orcl18c
Dataguard configuration
Enabled: 0
Mode: PRIMARY
Looking for previous configuration:
Directory : /home/oracle/bkup/orcl18c
-> obkup
-> Found: 1 files
-> Moving previous configuration to /home/oracle/bkup/orcl18c_20180618155630
No initial bkup of PFILE needed.
Configuring Backup to disk
Common RMAN Config
Instantiating obkup
Instantiating dbcfg.spec
Configuring backup of Config File
Updating Control File Record Keep Time
Enabling block change tracking
Updating RMAN defaults
Adding entry to crontab
INFO: Archivelog management enabled.
Adding entry to crontab
Accessing to your Database ID ..
The DBaaS instance database id is: 514875479
Deleting unencrypted autobackups.
#### Completed Execution.
Step6:-Enable crontab
[root@oracle18c assistants]# 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
41 0 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start –dbname=orcl18c
0,30 * * * * root /var/opt/oracle/bkup_api/bkup_api bkup_archlogs –dbname=orcl18c
Step7:-execute manually
[root@oracle18c assistants]# /var/opt/oracle/bkup_api/bkup_api bkup_archlogs –dbname=orcl18c
Before run this script check the /u03 Mount point space is less we need to add storage for this mount point because rman backup scheduled to /u03 mount point
Scaling Up Storage for Oracle 18c Database Deployment Here
Reference:-
Catch Me On:- Hariprasath Rajaram
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba