ZDLRA, OSB and Clone to Tape

As you saw in my last post, the configuration to enable clone to tape for ZDLRA it is not complicated, but you need to take care of some details to avoid errors. Besides that, ZDLRA relies on OSB to do that (when configured with native tape support) and this has some details that you need to be aware of.

 

In this post, I will show how the clone to tape works for ZDLRA. And how you can check some details about OSB.

 

Basic Config

Below you can see how I configured the clone to tape templates:

 

SQL> BEGIN

  2      DBMS_RA.CREATE_SBT_JOB_TEMPLATE (

  3          template_name => 'ONLYTAPE_FULL_ARCH',

  4          protection_policy_name => 'ZDLRA_ONLY_TAPE',

  5          attribute_set_name => 'bronzerepfull',

  6          backup_type => 'FULL,ARCH',

  7          priority => DBMS_RA.SBT_PRIORITY_LOW,

  8          window => INTERVAL '4' HOUR

  9      );

 10  END;

 11  /




PL/SQL procedure successfully completed.




SQL> BEGIN

  2      DBMS_RA.CREATE_SBT_JOB_TEMPLATE (

  3          template_name => 'ONLYTAPE_ARCH',

  4          protection_policy_name => 'ZDLRA_ONLY_TAPE',

  5          attribute_set_name => 'bronzerepfull',

  6          backup_type => 'ARCH',

  7          priority => DBMS_RA.SBT_PRIORITY_LOW,

  8          window => INTERVAL '4' HOUR

  9      );

 10  END;

 11  /




PL/SQL procedure successfully completed.




SQL>

 

Basic configuration for the protection policy ZDLRA_ONLY_TAPE and with FULL and ARCHIVELOGS clones. For more details you can check my previous post.
You can check the table RASYS.RA_SBT_JOB to check all the templates already configured:

 

SQL> set linesize 250

SQL> col LIB_NAME format a30

SQL> col TEMPLATE_NAME format a50

SQL> col LAST_SCHEDULE_TIME format a35

SQL> col POLICY_NAME format a50

SQL> select TEMPLATE_NAME, BACKUP_TYPE, LAST_SCHEDULE_TIME, LIB_NAME, DB_UNIQUE_NAME, POLICY_NAME FROM RA_SBT_JOB WHERE LIB_NAME = 'OSBSBT' ;




TEMPLATE_NAME                                      BACKUP_TYPE      LAST_SCHEDULE_TIME                  LIB_NAME                       DB_UNIQUE_NAME                 POLICY_NAME

-------------------------------------------------- ---------------- ----------------------------------- ------------------------------ ------------------------------ --------------------------------------------------

BRONZE_ARCH                                        ARCH             29-DEC-19 11.59.59.513917 PM +01:00 OSBSBT                                                        ZDLRA_BRONZE

BRONZE_FULL_ARCH                                   FULL, ARCH       03-JAN-20 11.10.27.411320 PM +01:00 OSBSBT                                                        ZDLRA_BRONZE

GOLDEN_ARCH                                        ARCH                                                 OSBSBT                                                        ZDLRA_GOLDEN

GOLDEN_FULL_ARCH                                   FULL, ARCH       01-JAN-20 11.10.47.987397 PM +01:00 OSBSBT                                                        ZDLRA_GOLDEN

ONLYTAPE_FULL_ARCH                                 FULL, ARCH                                           OSBSBT                                                        ZDLRA_ONLY_TAPE

ONLYTAPE_ARCH                                      ARCH                                                 OSBSBT                                                        ZDLRA_ONLY_TAPE




6 rows selected.




SQL>

 

Check that if the clone for this template was called you can see the information in the column LAST_SCHEDULE_TIME. And in this case, since I have not created the scheduler for this, it is empty.
To do that, just created the scheduler for that:

 

SQL> BEGIN

  2      DBMS_SCHEDULER.CREATE_JOB(

  3          job_name => 'SBTJOB_ONLYTAPE_FULL_ARCH',

  4          job_type => 'PLSQL_BLOCK',

  5          job_action => 'dbms_ra.queue_sbt_backup_task(''ONLYTAPE_FULL_ARCH'');',

  6          start_date => SYSDATE+(1/1440),

  7          enabled => TRUE,

  8          auto_drop => TRUE,

  9          repeat_interval => 'freq=WEEKLY; BYDAY=SUN; BYHOUR=20'

 10      );

 11  END;

 12  /




PL/SQL procedure successfully completed.




SQL> BEGIN

  2      DBMS_SCHEDULER.CREATE_JOB(

  3          job_name => 'SBTJOB_ONLYTAPE_ARCH',

  4          job_type => 'PLSQL_BLOCK',

  5          job_action => 'dbms_ra.queue_sbt_backup_task(''ONLYTAPE_ARCH'');',

  6          start_date => SYSDATE+(1/1440),

  7          enabled => TRUE,

  8          auto_drop => TRUE,

  9          repeat_interval => 'freq=HOURLY; BYMINUTE=40'

 10      );

 11  END;

 12  /




PL/SQL procedure successfully completed.




SQL>

 

Database Backup

For ZDLRA I have the database ORCL18C linked with this protection policy and I have some backups for this database. You can see below the backups for datafile 1:

 

RMAN> list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

16512   Incr 0  330.35M    SBT_TAPE    00:03:03     02/02/2020 16:12:04

        BP Key: 16513   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC0

        Handle: VB$_1891149551_16507I   Media:

  List of Datafiles in backup set 16512

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1909028    02/02/2020 16:09:01              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

16673   Incr 1  96.00K     SBT_TAPE    00:00:04     02/02/2020 16:27:01

        BP Key: 16674   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB

        Handle: VB$_1891149551_16669I   Media:

  List of Datafiles in backup set 16673

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    1  Incr 1910623    02/02/2020 16:26:57              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

16701   Incr 0  329.22M    SBT_TAPE    00:00:04     02/02/2020 16:27:01

        BP Key: 16702   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB

        Handle: VB$_1891149551_16669_1   Media:

  List of Datafiles in backup set 16701

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1910623    02/02/2020 16:26:57              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




RMAN>

 

Check that I have the backupsets 16512 and 16701 that are the full backup. And the same for archivelogs.

 

During the Clone

When the scheduler trigger the clones, we can follow it inside of ZDLRA in several ways. But the point is that (as usual), for ZDLRA, everything is a task. So, we can see information in the tables RA_TASK and in RA_SBT_TASK.
You can create your sql’s to check what it is running, but look this example:

 

SQL> col state format a20

SQL> col ERROR_TEXT format a50

SQL> SELECT TASK_ID, STATE, DB_UNIQUE_NAME, ERROR_TEXT, BS_KEY, PIECE# FROM RA_SBT_TASK WHERE LIB_NAME = 'OSBSBT' AND  DB_UNIQUE_NAME = 'ORCL18C' ORDER BY DB_UNIQUE_NAME, BS_KEY, PIECE#;




   TASK_ID STATE                DB_UNIQUE_NAME                 ERROR_TEXT                                             BS_KEY     PIECE#

---------- -------------------- ------------------------------ -------------------------------------------------- ---------- ----------

     33698 EXECUTABLE           ORCL18C                                                                                16542          1

     33700 EXECUTABLE           ORCL18C                                                                                16565          1

     33702 EXECUTABLE           ORCL18C                                                                                16582          1

     33721 EXECUTABLE           ORCL18C                                                                                16618          1

     33704 EXECUTABLE           ORCL18C                                                                                16701          1

     33722 EXECUTABLE           ORCL18C                                                                                16706          1

     33706 EXECUTABLE           ORCL18C                                                                                16725          1

     33708 EXECUTABLE           ORCL18C                                                                                16734          1

     33710 EXECUTABLE           ORCL18C                                                                                16743          1

     33712 EXECUTABLE           ORCL18C                                                                                16752          1

     33714 EXECUTABLE           ORCL18C                                                                                16761          1




   TASK_ID STATE                DB_UNIQUE_NAME                 ERROR_TEXT                                             BS_KEY     PIECE#

---------- -------------------- ------------------------------ -------------------------------------------------- ---------- ----------

     33716 EXECUTABLE           ORCL18C                                                                                16782          1

     33718 EXECUTABLE           ORCL18C                                                                                16791          1

     33723 EXECUTABLE           ORCL18C                                                                                16795          1

     33720 EXECUTABLE           ORCL18C                                                                                16825          1




15 rows selected.




SQL>

 

The output above I picked up exactly when the job SBTJOB_ONLYTAPE_FULL_ARCH was running. You can see that ZDLRA put all the backupsets that was not cloned yet in the queue. At this moment, ZDLRA is creating the backupsets (since they exist jus in RA.VBDF table) and sending them (one to one) to OSB.
You can do the same for RA_TASK:

 

SQL> select TASK_ID, TASK_TYPE, STATE, WAITING_ON, DB_KEY, DB_UNIQUE_NAME, CREATION_TIME, ERROR_COUNT, INTERRUPT_COUNT, BP_KEY,BS_KEY,DF_KEY,VB_KEY from rasys.ra_task where DB_UNIQUE_NAME = 'ORCL18C' and task_type LIKE '%SBT' order by 5,2,7,10,11,12,13;




   TASK_ID TASK_TYPE                      STATE                     WAITING_ON     DB_KEY DB_UNIQUE_NAME                 CREATION_TIME                       ERROR_COUNT INTERRUPT_COUNT     BP_KEY     BS_KEY     DF_KEY     VB_KEY

---------- ------------------------------ ------------------------- ---------- ---------- ------------------------------ ----------------------------------- ----------- --------------- ---------- ---------- ---------- ----------

     33698 BACKUP_SBT                     RUNNING                                   15993 ORCL18C                        02-FEB-20 04.40.36.631549 PM +01:00           0               0                 16542

     33700 BACKUP_SBT                     RUNNING                                   15993 ORCL18C                        02-FEB-20 04.40.36.833354 PM +01:00           0               0                 16565

     33702 BACKUP_SBT                     RUNNING                                   15993 ORCL18C                        02-FEB-20 04.40.36.844599 PM +01:00           0               0                 16582

     33704 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.861902 PM +01:00           0               0                 16701

     33706 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.883175 PM +01:00           0               0                 16725

     33708 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.898718 PM +01:00           0               0                 16734

     33710 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.905336 PM +01:00           0               0                 16743

     33712 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.924090 PM +01:00           0               0                 16752

     33714 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.939241 PM +01:00           0               0                 16761

     33716 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.961104 PM +01:00           0               0                 16782

     33718 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.980517 PM +01:00           0               0                 16791




   TASK_ID TASK_TYPE                      STATE                     WAITING_ON     DB_KEY DB_UNIQUE_NAME                 CREATION_TIME                       ERROR_COUNT INTERRUPT_COUNT     BP_KEY     BS_KEY     DF_KEY     VB_KEY

---------- ------------------------------ ------------------------- ---------- ---------- ------------------------------ ----------------------------------- ----------- --------------- ---------- ---------- ---------- ----------

     33720 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.992346 PM +01:00           0               0                 16825

     33721 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.37.059282 PM +01:00           0               0                 16618

     33722 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.37.061375 PM +01:00           0               0                 16706

     33723 BACKUP_SBT                     EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.37.063679 PM +01:00           0               0                 16795

     33699 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.783661 PM +01:00           0               0                 16542      16014      16538

     33701 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.834255 PM +01:00           0               0                 16565      16012      16561

     33703 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.845368 PM +01:00           0               0                 16582      16018      16577

     33705 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.862820 PM +01:00           0               0                 16701      16006      16669

     33707 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.883803 PM +01:00           0               0                 16725      16008      16710

     33709 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.899324 PM +01:00           0               0                 16734      16022      16729

     33711 PLAN_SBT                       COMPLETED                                 15993 ORCL18C                        02-FEB-20 04.40.36.906037 PM +01:00           0               0                 16743      16010      16738




   TASK_ID TASK_TYPE                      STATE                     WAITING_ON     DB_KEY DB_UNIQUE_NAME                 CREATION_TIME                       ERROR_COUNT INTERRUPT_COUNT     BP_KEY     BS_KEY     DF_KEY     VB_KEY

---------- ------------------------------ ------------------------- ---------- ---------- ------------------------------ ----------------------------------- ----------- --------------- ---------- ---------- ---------- ----------

     33713 PLAN_SBT                       EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.924844 PM +01:00           0               0                 16752      16020      16747

     33715 PLAN_SBT                       EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.939997 PM +01:00           0               0                 16761      16024      16756

     33717 PLAN_SBT                       EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.961701 PM +01:00           0               0                 16782      16016      16777

     33719 PLAN_SBT                       EXECUTABLE                                15993 ORCL18C                        02-FEB-20 04.40.36.981277 PM +01:00           0               0                 16791      16026      16786




26 rows selected.




SQL>

 

Inside OSB

At OSB side we can check some information about how it is processing the clones. For OSB, everything is one job, and we can check in with obtool.

To check the jobs we execute obtool lsjob:

 

[root@zdlras1n1 ~]# obtool lsjob

Job ID           Sched time  Contents                       State

---------------- ----------- ------------------------------ ---------------------------------------

oracle/38        none        database ORCL18C (dbid=558466555) processed; Oracle job(s) scheduled

oracle/38.2      none        datafile backup                running since 2020/02/02.16:43

oracle/38.4      none        datafile backup                running since 2020/02/02.16:44

[root@zdlras1n1 ~]#

 

Some important information here. For every scheduler that was triggered by ZDLRA, we can see the job for each database, in this case, oracle/38. This is the master job, just to control what is happening. If you have more than one database in the same job being cloned, you will see more.
For each backupset that it is needed to be cloned, you will see child jobs (derived from the master). And for this, we can see logs from what is happening. All the logs for OSB are in the folder /usr/etc/ob/xcr/. Doing a cat from one finished job we can see useful information:

 

[root@zdlras1n1 ~]# cat /usr/etc/ob/xcr/[email protected]

[4100000001]2020/02/02.16:43:15 ______________________________________________________________________

[4100000001]2020/02/02.16:43:15

[4100000002]2020/02/02.16:43:15         Transcript for job oracle/38.2 running on zdlras1n1

[4100000002]2020/02/02.16:43:15

[3100000003]2020/02/02.16:43:15 Info: mount data verified.

[3100000004]2020/02/02.16:43:15 Info: volume in tape04 is usable for this operation.

[1100000005]2020/02/02.16:43:15 (pvfw) not at BOT

[1100000006]2020/02/02.16:43:15 (pvfw) previous state is invalid

[1100000007]2020/02/02.16:43:15 (alv)  backup image label is valid, file 21, section 1

[1100000008]2020/02/02.16:43:15 (pvfw) at OB EOD, returning (1)

[1100000009]2020/02/02.16:43:15 (pvfw) pos_vol_cleanup not returning pstate

[010000000A]2020/02/02.16:43:15 (dmap) tape04 success

[410000000B]Volume label:

[410000000C]    Volume tag:             E01011L4

[410000000D]    Volume UUID:            a1f8db28-109b-1038-847b-080027b2a93d

[410000000E]    Volume ID:              zdlras1-osbmf-000006

[410000000F]    Volume set ID:          zdlras1-osbmf-000002

[4100000010]    Previous volume:        zdlras1-osbmf-000002

[4100000011]    Volume sequence:        2

[4100000012]    Volume set owner:       root

[4100000013]    Volume set created:     Sun Dec 29 23:35:18 2019

[4100000014]    Volume set closes:      Wed Oct 19 00:35:18 2022 (no writes after this time)

[4000000015]    Media family:           zdlras1-osbmf

[4100000016]

[4100000017]    Volume set expires: never; content manages reuse

[4100000018]

[4100000019]Archive label:

[410000001A]    File number:            21

[410000001B]    File section:           1

[410000001C]    Owner:                  root

[410000001D]    Client host:            zdlras1n1

[410000001E]    Backup level:           0

[410000001F]    S/w compression:        no

[4100000020]    Archive created:        Sun Feb 02 16:43:15 2020

[4100000021]    Archive owner:          oracle (UUID bbad0004-01a9-1038-abb2-080027b2a93d)

[4100000022]    Owner class:            oracle (UUID a43aa638-01a9-1038-8809-080027b2a93d)

[4100000023]    Backup piece name:      RA_SBT_ORCL18C_558466555_16849_rpunhlqh_1_2_16701

[4100000024]    Backup db name:         ORCL18C

[4100000025]    Backup db id:           558466555

[4100000026]    Backup copy number:     not applicable

[4100000027]    Backup content:         full

[4100000028]    Encryption:             off

[4100000029]    Catalog data:           no

[410000002A]    Backup image UUID:      4599459c-27f8-1038-adc6-080027b2a93d

[410000002B]    Backup instance UUID:   459945b0-27f8-1038-adc6-080027b2a93d

[410000002C]    Backup instance created:Sun Feb 02 16:43:15 2020

[410000002D]

[410000002E]

[410000002E]Backup statistics:

[410000002F]status 0

[4000000030]devices

[4000000031] tape04

[4100000032]

[4000000033]volumes

[4000000034] zdlras1-osbmf-000006

[4100000035]

[4000000036]voltags

[4000000037] E01011L4

[4100000038]

[4100000039]file 21

[410000003A]host zdlras1n1

[410000003B]encryption off

[410000003C]compression no

[410000003D]start_time  Sun Feb 02 2020 at 16:43:15 (1580658195)

[410000003E]end_time    Sun Feb 02 2020 at 16:44:20 (1580658260)

[410000003F]backup_time Sun Feb 02 2020 at 16:43:15 (1580658195)

[4100000040]dev_kbytes 753036

[4100000041]dev_iosecs 60

[4100000042]dev_iorate 12.9 MB/S

[4100000043]wrt_iosecs 65

[4100000044]wrt_iorate 11.9 MB/S

[4100000045]physical_blks_written 368

[4100000046]write_errors 0

[4100000047]physical_blks_read 0

[4100000048]read_errors 0

[4100000049]error_rate 0%

[410000004A]piece RA_SBT_ORCL18C_558466555_16849_rpunhlqh_1_2_16701 completed, status 0

[root@zdlras1n1 ~]#

 

Some important details from there:
  • Volume tag: This is the tag for your tape. This can from the barcode read by OSB
  • Backup piece name: The name that was created and identify the file inside OSB
  • wrt_iorate: This is the speed that OSB wrote into the tape
  • write_errors: Errors that occurred while writing.
If that you can create some scripts to verify details from your OSBD clones:

 

[root@zdlras1n1 ~]# cat /usr/etc/ob/xcr/oracle@38.* |grep "Volume tag"

[410000000C]    Volume tag:             E01010L4

[410000000C]    Volume tag:             E01011L4

[410000000C]    Volume tag:             E01009L4

[410000000C]    Volume tag:             E01010L4

[410000000C]    Volume tag:             E01010L4

[410000000C]    Volume tag:             E01011L4

[410000000C]    Volume tag:             E01009L4

[root@zdlras1n1 ~]#

 

As told before (in my previous post), the integration between OSB and ZDLRA is not the best (to be honest). For ZDLRA OSB is one external tool. As an example, from ZDLRA library (cli or in cloud control) you can’t check OSB jobs and other details (like if the library has free tapes). If the clone fails, ZDLRA does not provide a good report and you need to go to CLI and use obtool. Look below that OSB is a separate box (image took from ZDLRA Administrator’s Guide).

Useful OSB commands

You can see more information about the devices using the obtool lsdev. Here I have 4 drivers:

 

[root@zdlras1n1 ~]# obtool lsdev

library             lib01            in service

  drive 1           tape01           in service

  drive 2           tape02           in service

  drive 3           tape03           in service

  drive 4           tape04           in service

[root@zdlras1n1 ~]#

 

And about the library (listing tapes) with obtool lsvol. To verify if you have free tapes inside of OSB library, as an example:

 

[root@zdlras1n1 ~]# obtool lsvol -L lib01

Inventory of library lib01:

    in    1:             unlabeled, barcode E01001L4, readonly

    in    2:             unlabeled, barcode E01002L4, readonly

    in    3:             unlabeled, barcode E01003L4, readonly

    in    4:             unlabeled, barcode E01004L4, readonly

    in    5:             volume zdlras1-osbmf-000001, barcode E01005L4, full, content manages reuse

    in    6:             volume zdlras1-osbmf-000002, barcode E01006L4, full, content manages reuse, mediainfo hw encryptable

    in    7:             volume zdlras1-osbmf-000003, barcode E01007L4, full, content manages reuse, mediainfo hw encryptable

    in    8:             volume RMAN-DEFAULT-000001, barcode E01008L4, content manages reuse

    in    12:            barcode E01012L4

    in    13:            barcode E01013L4

    in    14:            barcode E01014L4

    in    15:            barcode E01015L4

    in    16:            barcode E01016L4

    in    17:            barcode E01017L4

    in    18:            barcode E01018L4

    in    19:            barcode E01019L4

    in    20:            barcode E01020L4

    in    22:            barcode CLN101L4

    in    23:            barcode CLN102L5

    in    30:            barcode F01030L5

    in    31:            barcode F01031L5

    in    32:            barcode F01032L5

    in    33:            barcode F01033L5

    in    34:            barcode F01034L5

    in    35:            barcode F01035L5

    in    36:            barcode F01036L5

    in    37:            barcode F01037L5

    in    38:            barcode F01038L5

    in    39:            barcode F01039L5

    in    dte1:          volume zdlras1-osbmf-000004, barcode E01009L4, 233472 kb remaining, content manages reuse, lastse 9, mediainfo hw encryptable

    in    dte3:          volume zdlras1-osbmf-000005, barcode E01010L4, 159744 kb remaining, content manages reuse, lastse 10

    in    dte4:          volume zdlras1-osbmf-000006, barcode E01011L4, 18432 kb remaining, content manages reuse, lastse 11

[root@zdlras1n1 ~]#

 

And if you want to check for some volume obtool lsvol -b can be used. This is important to see everything that is inside one tape in specific:

 

[root@zdlras1n1 ~]# obtool lsvol -b E01011L4

    VOID    OOID Seq Volume ID          Barcode     Family      Created     Attributes

     157     157   2 zdlras1-osbmf-000006 E01011L4    zdlras1-osbmf 12/29.23:35 open; closes 2022/10/18; content manages reuse

[root@zdlras1n1 ~]#

 

And for the OSB volume that it inside of this tape we can use obtool lsbkup:

 

[root@zdlras1n1 ~]# obtool lsbkup -l -c zdlras1-osbmf-000006

Backup image name:    zdlras1n1-20200103-221130

    Type:                   Oracle database

    Client:                 zdlras1n1

    Backup piece name:      RA_SBT_ORCL19_13806_13805_nrul3953_1_2_0_MMNYx

    Database:               ORCL19

    Content:                full

    Size:                   768.2 MB

    Backup owner:           oracle

    Owner class:            oracle

    Backup date and time:   2020/01/03.23:11

    Created by job:         oracle/36.1

    UUID:                   89a815e8-109b-1038-847b-080027b2a93d

Backup image name:    zdlras1n1-20200202-154208

    Type:                   Oracle database

    Client:                 zdlras1n1

    Backup piece name:      RA_SBT_ORCL18C_558466555_16849_33unhlfr_1_2_16565

    Database:               ORCL18C

    Content:                full

    Size:                   240.8 MB

    Backup owner:           oracle

    Owner class:            oracle

    Backup date and time:   2020/02/02.16:42

    Created by job:         oracle/37.2

    UUID:                   1ef6b2ee-27f8-1038-995e-080027b2a93d

Backup image name:    zdlras1n1-20200202-154315

    Type:                   Oracle database

    Client:                 zdlras1n1

    Backup piece name:      RA_SBT_ORCL18C_558466555_16849_rpunhlqh_1_2_16701

    Database:               ORCL18C

    Content:                full

    Size:                   735.4 MB

    Backup owner:           oracle

    Owner class:            oracle

    Backup date and time:   2020/02/02.16:43

    Created by job:         oracle/38.2

    UUID:                   4599459c-27f8-1038-adc6-080027b2a93d

Backup image name:    zdlras1n1-20200202-154431

    Type:                   Oracle database

    Client:                 zdlras1n1

    Backup piece name:      RA_SBT_ORCL18C_558466555_16849_f2unhlqu_1_2_16782

    Database:               ORCL18C

    Content:                full

    Size:                   1.2 MB

    Backup owner:           oracle

    Owner class:            oracle

    Backup date and time:   2020/02/02.16:44

    Created by job:         oracle/38.6

    UUID:                   72577360-27f8-1038-8987-080027b2a93d

Backup image name:    zdlras1n1-20200202-154504

    Type:                   Oracle database

    Client:                 zdlras1n1

    Backup piece name:      RA_SBT_c-558466555-20200202-00

    Database:               ORCL18C

    Content:                full

    Size:                   18.1 MB

    Backup owner:           oracle

    Owner class:            oracle

    Backup date and time:   2020/02/02.16:45

    Created by job:         oracle/39.2

    UUID:                   85c228c8-27f8-1038-bcf9-080027b2a93d

[root@zdlras1n1 ~]#

 

As you can see we can use these commands to check what a lot of details about the volumes and tapes. In the command above you can see that inside of the same volume store backups from different databases. This occurs because of the share the same attribute inside ZDLRA, and there, I specified only one volume. 
If you want to see some details about one database you can use obtool lspiece:

 

[root@zdlras1n1 ~]# obtool lspiece -d ORCL18C

    POID Database   Content    Copy Created      Host             Piece name

     190 ORCL18C    full          0 02/02.16:42  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_34unhlje_1_2_16582

     191 ORCL18C    full          0 02/02.16:42  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_33unhlfr_1_2_16565

     192 ORCL18C    full          0 02/02.16:42  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_30unhl75_1_2_16542

     193 ORCL18C    full          0 02/02.16:43  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_cqunhlqk_1_2_16725

     194 ORCL18C    full          0 02/02.16:43  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_obunhlqn_1_2_16734

     195 ORCL18C    full          0 02/02.16:44  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_5dunhlqo_1_2_16743

     196 ORCL18C    full          0 02/02.16:43  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_rpunhlqh_1_2_16701

     197 ORCL18C    full          0 02/02.16:44  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_vuunhlqp_1_2_16752

     198 ORCL18C    full          0 02/02.16:44  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_f2unhlqu_1_2_16782

     199 ORCL18C    full          0 02/02.16:44  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_h1unhlqt_1_2_16761

     200 ORCL18C    full          0 02/02.16:44  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_9junhlqv_1_2_16791

     201 ORCL18C    full          0 02/02.16:45  zdlras1n1        RA_SBT_c-558466555-20200202-00

     202 ORCL18C    full          0 02/02.16:45  zdlras1n1        RA_SBT_c-558466555-20200202-02

     203 ORCL18C    full          0 02/02.16:45  zdlras1n1        RA_SBT_c-558466555-20200202-01

     204 ORCL18C    full          0 02/02.16:45  zdlras1n1        RA_SBT_ORCL18C_558466555_16849_6lunhltm_1_2_16795

[root@zdlras1n1 ~]#

 

For job list you can use the obtool lsjob -A:

 

[root@zdlras1n1 ~]# obtool lsjob -A

Job ID           Sched time  Contents                       State

---------------- ----------- ------------------------------ ---------------------------------------

oracle/36        none        database ORCL19 (dbid=323177095) completed successfully at 2020/01/03.23:12

oracle/36.1      none        datafile backup                completed successfully at 2020/01/03.23:12

oracle/37        none        database ORCL18C (dbid=558466555) completed successfully at 2020/02/02.16:42

oracle/37.1      none        datafile backup                completed successfully at 2020/02/02.16:42

oracle/37.2      none        datafile backup                completed successfully at 2020/02/02.16:42

oracle/37.3      none        datafile backup                completed successfully at 2020/02/02.16:42

oracle/38        none        database ORCL18C (dbid=558466555) completed successfully at 2020/02/02.16:44

oracle/38.1      none        datafile backup                completed successfully at 2020/02/02.16:43

oracle/38.2      none        datafile backup                completed successfully at 2020/02/02.16:44

oracle/38.3      none        datafile backup                completed successfully at 2020/02/02.16:43

oracle/38.4      none        datafile backup                completed successfully at 2020/02/02.16:44

oracle/38.5      none        datafile backup                completed successfully at 2020/02/02.16:44

oracle/38.6      none        datafile backup                completed successfully at 2020/02/02.16:44

oracle/38.7      none        datafile backup                completed successfully at 2020/02/02.16:44

oracle/39        none        database ORCL18C (dbid=558466555) completed successfully at 2020/02/02.16:45

oracle/39.1      none        datafile backup                completed successfully at 2020/02/02.16:45

oracle/39.2      none        datafile backup                completed successfully at 2020/02/02.16:45

oracle/39.3      none        datafile backup                completed successfully at 2020/02/02.16:45

oracle/40        none        database ORCL18C (dbid=558466555) completed successfully at 2020/02/02.16:45

oracle/40.1      none        datafile backup                completed successfully at 2020/02/02.16:45

oracle/41        none        database ORCL18C (dbid=558466555) completed successfully at 2020/02/02.16:45

oracle/41.1      none        datafile backup                completed successfully at 2020/02/02.16:45

[root@zdlras1n1 ~]#

 

As told, with these commands you can verify allot of useful info about the health of your clone to tapes at OSB side. And unfortunately, it is the only way to do that since it can be done using ZDLRA CLI.

 

After clone

After the clone job finish you can see that a new copy for the backupset appears in the rman catalog:

 

RMAN> list backup of datafile 1;







List of Backup Sets

===================







BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

16512   Incr 0  330.35M    SBT_TAPE    00:03:03     02/02/2020 16:12:04

        BP Key: 16513   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB-INC0

        Handle: VB$_1891149551_16507I   Media:

  List of Datafiles in backup set 16512

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1909028    02/02/2020 16:09:01              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ -------------------

16673   Incr 1  96.00K     SBT_TAPE    00:00:04     02/02/2020 16:27:01

        BP Key: 16674   Status: AVAILABLE  Compressed: YES  Tag: BKP-DB

        Handle: VB$_1891149551_16669I   Media:

  List of Datafiles in backup set 16673

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    1  Incr 1910623    02/02/2020 16:26:57              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




BS Key  Type LV Size

------- ---- -- ----------

16701   Incr 0  329.22M

  List of Datafiles in backup set 16701

  File LV Type Ckp SCN    Ckp Time            Abs Fuz SCN Sparse Name

  ---- -- ---- ---------- ------------------- ----------- ------ ----

  1    0  Incr 1910623    02/02/2020 16:26:57              NO    /u01/app/oracle/oradata/ORCL18C/system01.dbf




  Backup Set Copy #1 of backup set 16701

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:42:37     02/02/2020 16:27:01 YES        BKP-DB




    List of Backup Pieces for backup set 16701 Copy #1

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    16702   1   AVAILABLE                           VB$_1891149551_16669_1




  Backup Set Copy #2 of backup set 16701

  Device Type Elapsed Time Completion Time     Compressed Tag

  ----------- ------------ ------------------- ---------- ---

  SBT_TAPE    00:42:37     02/02/2020 15:44:20 NO         BKP-DB




    List of Backup Pieces for backup set 16701 Copy #2

    BP Key  Pc# Status      Media                   Piece Name

    ------- --- ----------- ----------------------- ----------

    16876   1   AVAILABLE   zdlras1-osbmf-000006    RA_SBT_ORCL18C_558466555_16849_rpunhlqh_1_2_16701




RMAN>

 

Look that now the backupset 16701 has two copies. One inside ZDLRA database and others in the tape. And as you can see above, just the last full was cloned to tape. This is the default behavior for ZDLRA, just the last full is cloned to tape. I explained more in the previous post.
For archivelogs the process is a little different, but basically clones everything that was not yet. And if you have real-time redo you will have a lot of clones (since each one has a different backupset).
The management of the rman catalog is done automatically by ZDLRA. If your backup passes over the retention for recovery_window_goal (that manages just what is inside ZDLRA database), the copy will disappear from the list. The same occurs for cloned backups that follow the recovery_window_sbt parameter for your policy. The same is done when the clone is made, the new copy appears automatically.
 

 

 

Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purpose, specific data and identifications were removed to allow reach the generic audience and to be useful for the community.”