Viewing a list of registered backups

You can create a list of the registered ON-Bar backups performed on your system.

Procedure

To view the list of registered backups:
  1. Create a view in the sysutils database that contains information from the bar_action, bar_instance, and bar_object catalog tables.
    Include the following fields in the view:
    • Backup_ID: The internally generated ID for the backup
    • Type: Defines whether the backup is a whole system backup, dbspace backup, or logical log backup.
    • Object_Name: The name of the object backed up.
    • Ifx_Time: Time at which the object was created. For dbspace backups, the checkpoint time that started the backup. For logical logs, the time when the log become full.
    • CopyID_HI: The High part of the ID to locate the object in the storage manager.
    • CopyID_LO: The Low part of the ID to locate the object in the storage manager.
    • Backup_Start: Date and time when the backup started for this object
    • Backup_End: Date and time when the backup ended for this object.
    • Verify_Date: The time of the last verification made to this object, if any.
  2. Run a SELECT statement against the view.

Example

The following statement creates a view that contains backup information:

CREATE VIEW list_backups(Backup_ID, Type, Object_Name, Ifx_Time, CopyID_HI, 
            CopyID_LO, Backup_Start, Backup_End, Verify_Date)
AS SELECT * FROM (
SELECT
        act_aid AS backup_id,
        DECODE(act_type, 5, "Whole-System", DECODE(obj_type, "L", 
           "Logical log", "Dbspace")) AS Type,
        substr(obj_name,1, 8) AS Object_Name,
        min(DBINFO ('utc_to_datetime', seal_time)) AS Ifx_Time,
        ins_copyid_hi AS CopyID_HI,
        ins_copyid_lo AS CopyID_LO,
        act_start AS Backup_Start,
        act_end AS Backup_End,
        ins_verify_date AS Verify_Date

FROM
        bar_action A,
        bar_instance I,
        bar_object O
WHERE
        A.act_aid = I.ins_aid AND
        A.act_oid = O.obj_oid AND
        A.act_oid = I.ins_oid AND
        O.obj_type in ("R", "CD", "ND", "L")
GROUP BY 1,2,3,5,6,7,8,9
ORDER BY Ifx_Time, Backup_ID) AS view_list_backups

The following query returns all the backups:

SELECT * FROM list_backups