Skip to main content

Backup catalog maintenance

Download catalog, query backups and delete expired backups using your command line interface.

Topics


Overview

CxLink Backup keeps the inventory of all backups performed with the tool in the Database Catalog locally in your server. The file can be found in the following paths depending on the database.

DatabasePath
SAP HANA/hana/shared/$SAPSYSTEMNAME/global/hdb/opt/emory.db
SAP ASE$SYBASE/$SYBASE_ASE/emory.db
Oracle/oracle/$ORACLE_SID/sapprof/emory.db
MaxDB/opt/emory/conf/<SID>.db
DB2/opt/emory/conf/<SID>.db

After every backup a copy of the Database Catalog is uploaded to the storage target to grant the possibility to restore to any previous state even in an event of system failure or data loss.


Retrieve the latest catalog

In case of accidentally deletion, disaster recovery or system copy procedure, you can download the latest saved backup catalog from the Storage Provider by executing the following command:


_10
/opt/emory/emory catalog download


Query backups from command-line

Backup list

Print a CSV format output of the summary of backups that emory catalog has ever taken (deleted backups will not be retrieved)


_10
/opt/emory/emory catalog list

Expand to see an example

_13
/opt/emory/emory catalog list
_13
_13
#,EBID,ID,StartDate,EndDate,ExpirationDate,UID,Level,LcType,SourceDB,Status,#Objs
_13
1,20220225085552,1,2022-02-25 08:55:53,2022-02-25 08:57:32,,DBD,FULL,,DBD@sapnwdb2,completed,0
_13
2,20220225085750,2,2022-02-25 08:57:50,2022-02-25 08:57:58,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
3,20220225093619,3,2022-02-25 09:36:20,2022-02-25 09:37:54,,DBD,FULL,,DBD@sapnwdb2,completed,0
_13
4,20220225093738,4,2022-02-25 09:37:38,2022-02-25 09:37:44,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
5,20220301175414,5,2022-03-01 17:54:14,2022-03-01 17:54:24,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
6,20220302070434,6,2022-03-02 07:04:34,2022-03-02 07:04:45,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
7,20220302234442,7,2022-03-02 23:44:42,2022-03-02 23:44:52,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
8,20220303154452,8,2022-03-03 15:44:52,2022-03-03 15:46:30,,DBD,FULL,,DBD@sapnwdb2,completed,0
_13
9,20220303154613,9,2022-03-03 15:46:13,2022-03-03 15:46:21,,DBD,ARCHIVE,,DBD@sapnwdb2,completed,0
_13
...

You can filter by date and expiration.

Execute /opt/emory/emory catalog list --help to display such options:


_10
Usage: emory catalog list
_10
_10
Get a complete list of catalog backups
_10
_10
Flags:
_10
-h, --help Show context-sensitive help.
_10
_10
--expired List expired backups only
_10
--start-date=STRING Define start date (YYYY-MM-DD)
_10
--end-date=STRING Define end date (YYYY-MM-DD)

Detailed information of a specific backup

You can retrieve more detailed information for a backup using its backup id from catalog list


_10
/opt/emory/emory catalog info <backup-id>

Expand to see an example

_36
/opt/emory/emory catalog info 20220609232404
_36
_36
+---+----------------+-----+---------------------+---------------------+-----------------------+-----+---------+--------+--------------+-----------+-------+
_36
| # | EBID | ID | STARTDATE | ENDDATE | EXPIRATIONDATE | UID | LEVEL | LCTYPE | SOURCEDB | STATUS | #OBJS |
_36
+---+----------------+-----+---------------------+---------------------+-----------------------+-----+---------+--------+--------------+-----------+-------+
_36
| 1 | 20220609232404 | 286 | 2022-06-09 23:24:04 | 2022-06-09 23:24:15 | 2022-06-11 23:24:04 * | DBD | ARCHIVE | | DBD@sapnwdb2 | completed | 1 |
_36
+---+----------------+-----+---------------------+---------------------+-----------------------+-----+---------+--------+--------------+-----------+-------+
_36
+-------------------------+------------+-----+
_36
| BUCKET | ENCRYPTION | KEY |
_36
+-------------------------+------------+-----+
_36
| emory-backup-charlatans | none | |
_36
+-------------------------+------------+-----+
_36
+---+-------------------------------------------------------+---------------------------------------------------------------------+----------+-----------+------------+
_36
| # | NAME | KEY | SIZE | STATUS | COMPRESSED |
_36
+---+-------------------------------------------------------+---------------------------------------------------------------------+----------+-----------+------------+
_36
| 1 | /tmp/20220609232404.DBD.ARCHIVE.C0000006_S0000162.LOG | DBD/DBD/2022/06/09/20220609232404.DBD.ARCHIVE.C0000006_S0000162.LOG | 81928192 | completed | FALSE |
_36
+---+-------------------------------------------------------+---------------------------------------------------------------------+----------+-----------+------------+
_36
sapnwdb2:db2dbd 117> /opt/emory/emory catalog info 20220609165831
_36
+---+----------------+-----+---------------------+---------+-----------------------+-----+-------+--------+--------------+---------+-------+
_36
| # | EBID | ID | STARTDATE | ENDDATE | EXPIRATIONDATE | UID | LEVEL | LCTYPE | SOURCEDB | STATUS | #OBJS |
_36
+---+----------------+-----+---------------------+---------+-----------------------+-----+-------+--------+--------------+---------+-------+
_36
| 1 | 20220609165831 | 285 | 2022-06-09 16:58:31 | | 2022-06-16 16:58:31 * | DBD | FULL | Daily | DBD@sapnwdb2 | started | 4 |
_36
+---+----------------+-----+---------------------+---------+-----------------------+-----+-------+--------+--------------+---------+-------+
_36
+-------------------------+------------+-----+
_36
| BUCKET | ENCRYPTION | KEY |
_36
+-------------------------+------------+-----+
_36
| emory-backup-charlatans | none | |
_36
+-------------------------+------------+-----+
_36
+---+---------------------------------------------------+-----------------------------------------------------------------+------+---------+------------+
_36
| # | NAME | KEY | SIZE | STATUS | COMPRESSED |
_36
+---+---------------------------------------------------+-----------------------------------------------------------------+------+---------+------------+
_36
| 1 | /tmp/20220609165831.DBD.FULL.db2dbd.DBPART000.001 | DBD/DBD/2022/06/09/20220609165831.DBD.FULL.db2dbd.DBPART000.001 | 0 | started | FALSE |
_36
| 2 | /tmp/20220609165831.DBD.FULL.db2dbd.DBPART000.002 | DBD/DBD/2022/06/09/20220609165831.DBD.FULL.db2dbd.DBPART000.002 | 0 | started | FALSE |
_36
| 3 | /tmp/20220609165831.DBD.FULL.db2dbd.DBPART000.003 | DBD/DBD/2022/06/09/20220609165831.DBD.FULL.db2dbd.DBPART000.003 | 0 | started | FALSE |
_36
| 4 | /tmp/20220609165831.DBD.FULL.db2dbd.DBPART000.004 | DBD/DBD/2022/06/09/20220609165831.DBD.FULL.db2dbd.DBPART000.004 | 0 | started | FALSE |
_36
+---+---------------------------------------------------+-----------------------------------------------------------------+------+---------+------------+

Delete expired backups

If you specified a lifecycle policy during CxLink Backup configuration you can list all the backups that have expire.


_10
/opt/emory/emory catalog delete expired

tip

You can check expired backups before execute deletion running /opt/emory/emory catalog list --expired