Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Friday, December 1, 2017

Oracle cloud database 12.2 - View backup information


To List the available backups by using bkup_api

As root user:

bkup_api command
$ /var/opt/oracle/bkup_api/bkup_api bkup_status
-OR-

 List the available backups by using bkup_api
$ /var/opt/oracle/bkup_api/bkup_api recover_list
-OR-

 List normal backups by using dbaascli
$ dbaascli orec --args -list
-OR-

 List long-term backups by using dbaascli
$dbaascli orec --args -keep -list

Verify the obkup.log generated for backup
/home/oracle/bkup/<SID>/log/obkup.log
-OR

 Switch to 'oracle' user and connect to RMAN
RMAN target /RMAN> list backup;
-OR-
RMAN> list backup summary;

Cron schedule:
[root@erpdev1 etc]# cat /etc/crontab | grep -v "#"
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=
HOME=/

44 23 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start --dbname=erpdev2
0,30 * * * * root /var/opt/oracle/bkup_api/bkup_api bkup_archlogs --dbname=erpdev2
15 03 * * 6 oracle /var/opt/oracle/cleandb/cleandblogs.pl





Examples:


[root@erpdev1 ~]# /var/opt/oracle/bkup_api/bkup_api recover_list
DBaaS Backup API V1.5 @2016 Multi-Oracle home
DBaaS Backup API V1.5 @2015 Multi-Oracle home
-> Action : recover_list
-> logfile: /var/opt/oracle/bkup_api/log/bkup_api.log
Utility output:

OREC version: 16.0.0.0

Starting OREC
Logfile is /var/opt/oracle/log/erpdev2/orec/orec_2017-12-01_15:48:41.log
Config file is /var/opt/oracle/orec/orec.cfg

DB name: erpdev2
OREC:: RUNNING IN DATAGUARD ENVIRONMENT
OREC:: Catalog mode:  Disabled
Getting list backups...
  Backup Tag             Completion Date         Config Files Location
  ---------------------- ----------------------- ------------------------
  TAG20171114T002226     11/14/2017 00:22:26

  TAG20171114T003039     11/14/2017 00:30:39

  TAG20171114T003106     11/14/2017 00:31:06

  TAG20171201T153055     12/01/2017 15:30:55

  TAG20171201T153111     12/01/2017 15:31:11

  TAG20171114T002226     11/14/2017 00:22:26

  TAG20171114T003039     11/14/2017 00:30:39

  TAG20171114T003106     11/14/2017 00:31:06

  TAG20171201T153055     12/01/2017 15:30:55

  TAG20171201T153111     12/01/2017 15:31:11


-OR

[root@erpdev1 ~]# dbaascli orec --args -list
DBAAS CLI version 1.0.0
Executing command orec --args -list
--args : -list

OREC version: 16.0.0.0

Starting OREC
Logfile is /var/opt/oracle/log/erpdev2/orec/orec_2017-12-01_15:57:43.log
Config file is /var/opt/oracle/orec/orec.cfg

DB name: erpdev2
OREC:: RUNNING IN NON DATAGUARD ENVIRONMENT
OREC:: Catalog mode:  Disabled
Getting list backups...
  Backup Tag             Completion Date         Config Files Location
  ---------------------- ----------------------- ------------------------
  TAG20171114T002226     11/14/2017 00:22:26

  TAG20171114T003039     11/14/2017 00:30:39

  TAG20171114T003106     11/14/2017 00:31:06

  TAG20171201T153055     12/01/2017 15:30:55

  TAG20171201T153111     12/01/2017 15:31:11

  TAG20171114T002226     11/14/2017 00:22:26

  TAG20171114T003039     11/14/2017 00:30:39

  TAG20171114T003106     11/14/2017 00:31:06

  TAG20171201T153055     12/01/2017 15:30:55

  TAG20171201T153111     12/01/2017 15:31:11




[root@erpdev1 ~]# dbaascli orec --args -keep -list
DBAAS CLI version 1.0.0
Executing command orec --args -keep -list
--args : -keep -list

OREC version: 16.0.0.0

Starting OREC
Logfile is /var/opt/oracle/log/erpdev2/orec/orec_2017-12-01_16:03:27.log
Config file is /var/opt/oracle/orec/orec.cfg

DB name: erpdev2
OREC:: RUNNING IN NON DATAGUARD ENVIRONMENT
OREC:: Catalog mode:  Disabled
Tag parameter not required
OREC::############ LONG-TERM RETENTION BACKUPS #############

  Backup Tag             Completion Date
------------------------ -------------------------
The system is clean no forever backups found
[root@erpdev1 ~]#



-OR

[oracle@ERPStandby ~]$ rman

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Dec 1 16:03:44 2017

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target /

connected to target database: ERPPRD (DBID=1847233764)

RMAN> list backup summary;

using target database control file instead of recovery catalog

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---

45      B  A  A SBT_TAPE    22-NOV-17       1       1       YES        TAG20171122T143044
46      B  A  A SBT_TAPE    22-NOV-17       1       1       YES        TAG20171122T143044
47      B  A  A SBT_TAPE    22-NOV-17       1       1       YES        TAG20171122T143044
48      B  F  A SBT_TAPE    22-NOV-17       1       1       NO         TAG20171122T143053
49      B  F  A DISK        22-NOV-17       1       1       NO         TAG20171122T155231
50      B  F  A DISK        22-NOV-17       1       1       NO         TAG20171122T161903
51      B  F  A DISK        22-NOV-17       1       1       NO         TAG20171122T194608
52      B  F  A DISK        01-DEC-17       1       1       NO         TAG20171201T154354



No comments: