Solved

Get MAXDB and SAP HANA log backups from REST API


Badge +3

Hello,
I look for a way to distinguish between MAXDB log backups and data backups in the REST API.
As you can see in the attached screenshot they are marked as "Incremental (Log, Config)" and "Incremental (Data, Config)" in the GUI, but the REST API marks both as backup type "Incremental" without additional information.
I have checked the queries for the job summary and job details, but all attributes (backupLevelName, localizedBackupLevelName, backupType) say "Incremental".

Is there any way to get this additional information?


I am also looking for a way to query log backups from SAP HANA. 
My current logic is to look for job type 18 ("Application Command Line Backups") and process all SAP HANA backups as log backups.
However, I can't guarantee if this is always the case. 
Is there another way to query such backups?

 

 

icon

Best answer by Mike Struening RETIRED 9 July 2021, 17:28

View original

10 replies

Userlevel 5
Badge +13

Hi @Bjoern_SRZC 

 

For SAP MAXDB, can you give the API and sample response you receive?

 

For SAP HANA, a simple way identify log jobs is to look at the subclient name. All log backups are under the subclient (Logcommand line).

 

Thanks,

Sunil-

 

Badge +3

Hi @Sunil,
thank your for your answer.
I don't have access to the system until wednesday, so I cannot provide examples for both, log and data backups.
From my previous attempts I only have a response for a log backup (seen as “Incremental (Log, Config)” in the GUI).

Please let me know if you need more samples so I can get them from the customer system on wednesday.

curl -k --location --request GET 'https://my-server/webconsole/api/Job/4948693' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken'

{
"totalRecordsWithoutPaging": 1,
"jobs": [
{
"jobSummary": {
"sizeOfApplication": 6378712,
"vsaParentJobID": 0,
"commcellId": 2,
"backupSetName": "default",
"opType": 18,
"totalFailedFolders": 0,
"totalFailedFiles": 0,
"alertColorLevel": 0,
"isVisible": true,
"localizedStatus": "Completed",
"isAged": false,
"totalNumOfFiles": 3,
"jobId": 4948693,
"sizeOfMediaOnDisk": 938823,
"currentPhase": 0,
"status": "Completed",
"lastUpdateTime": 1622858528,
"percentSavings": 85.2819,
"localizedOperationName": "Application Command Line Backup",
"statusColor": "black",
"errorType": 0,
"backupLevel": 2,
"jobElapsedTime": 50,
"jobStartTime": 1622858477,
"jobType": "Backup 3RD",
"isPreemptable": 0,
"backupLevelName": "Incremental",
"attemptStartTime": 0,
"appTypeName": "SAP for MAX DB",
"percentComplete": 100,
"localizedBackupLevelName": "Incremental",
"subclientName": "(command line)",
"destClientName": "redacted",
"jobEndTime": 1622858528,
"dataSource": {
"dataSourceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"backupsetId": 854,
"commCellName": "redacted",
"instanceId": 107,
"subclientId": 2046,
"clientId": 331,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 93
},
"destinationClient": {
"clientId": 331,
"clientName": "redacted",
"displayName": "redacted"
},
"userName": {
"userName": "redacted",
"userId": 1
},
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
},
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
}
]
}
}
]
}
curl --location --request POST 'https://my-server/webconsole/api/JobDetails' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"jobId": 4948693
}'

{
"job": {
"jobDetail": {
"detailInfo": {
"sizeOfApplication": "6378712",
"dataWritten": "938823",
"numOfObjects": 3,
"startTime": 1622858477,
"skippedItems": 0,
"workflowInputsXml": "",
"failures": "0 Folders, 0 Files",
"transferTime": "5",
"unCompressedBytes": 6378712,
"dataXferedNetwork": "950160",
"numOfStreams": 2,
"sizeOfMediaOnDisk": 938823,
"savingsPercent": "85.28",
"throughPut": "4.28",
"endTime": 1622858528,
"compressedBytes": 924039,
"xmlJobInfo": {
"adminJobInfo": {},
"rstJobInfo": {},
"bkpJobInfo": {
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
},
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
}
]
}
}
},
"generalInfo": {
"agingOn": 0,
"vsaParentJobID": 0,
"opType": 18,
"useScalableResourceAllocation": "No",
"readThroughtputInMBPerSec": 0,
"totalFilesToDownload": 0,
"jobStartedBy": "redacted",
"writeThroughtputInMBPerSec": 0,
"backupOption": 0,
"priority": 166,
"jobId": 4948693,
"operationType": "Application Command Line Backup",
"verificationType": 2,
"scanType": 0,
"snapToTapeStatus": 0,
"backupType": "Incremental",
"jobStartedFrom": "Third Party",
"startTime": 1622858477,
"jobIdActedOn": 0,
"mediaInventoryType": 0,
"snapDeferredCatalogStatus": 0,
"dataVerificationType": 3,
"softwareCompression": "Storage Policy",
"systemState": "No",
"encrypted": "No",
"dataSizeInMB": 0,
"workflow": {
"workflowName": ""
},
"mediaLibrary": {
"libraryId": 0
},
"destInstance": {
"instanceName": "",
"instanceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"displayName": "redacted",
"backupsetId": 854,
"instanceId": 107,
"subclientId": 2046,
"clientId": 331,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"DDBdetails": {
"sidbStoreId": 0
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 93
},
"destinationClient": {
"clientId": 0
},
"commcell": {
"commCellId": 2
}
},
"progressInfo": {
"reasonForJobDelay": "",
"state": "Completed",
"numOfFilesTransferred": 3
}
}
}
}

 

Userlevel 7
Badge +23

Hey @Bjoern_SRZC , following up to see if you were abler to get access to the system and check out @Sunil ‘s advice.  How did it go?

Badge +3

Hi @Mike Struening

I haven’t had a chance to access the system yet. The meeting with the admin was rescheduled to tomorrow. I’ll upload the sample data after that.

Sunil’s advice regarding the SAP HANA backups was useful and helped to identify the log backups.

Userlevel 7
Badge +23

Glad to hear it, thanks!  I'll await your update.

Badge +3

Hi @Mike Struening and @Sunil,

I finally got the necessary data.

As you can see in the screenshots, there are two jobs: 6165078 with backup type “Incremental (Log, Config)” and 6159575 with type “Incremental (Data. Config)”.

 

 

The log job produces this JSON response:

curl -k --location --request GET 'https://my-server/webconsole/api/Job/6165078' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken'

{
"totalRecordsWithoutPaging": 1,
"jobs": [
{
"jobSummary": {
"sizeOfApplication": 18046737,
"vsaParentJobID": 0,
"commcellId": 2,
"backupSetName": "default",
"opType": 18,
"totalFailedFolders": 0,
"totalFailedFiles": 0,
"alertColorLevel": 0,
"isVisible": true,
"localizedStatus": "Completed",
"isAged": false,
"totalNumOfFiles": 3,
"jobId": 6165078,
"sizeOfMediaOnDisk": 3115157,
"currentPhase": 0,
"status": "Completed",
"lastUpdateTime": 1625508138,
"percentSavings": 82.7384,
"localizedOperationName": "Application Command Line Backup",
"statusColor": "black",
"errorType": 0,
"backupLevel": 2,
"jobElapsedTime": 50,
"jobStartTime": 1625508087,
"jobType": "Backup 3RD",
"isPreemptable": 0,
"backupLevelName": "Incremental",
"attemptStartTime": 0,
"appTypeName": "SAP for MAX DB",
"percentComplete": 100,
"localizedBackupLevelName": "Incremental",
"subclientName": "(command line)",
"destClientName": "redacted",
"jobEndTime": 1625508138,
"dataSource": {
"dataSourceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"backupsetId": 873,
"commCellName": "redacted",
"instanceId": 115,
"subclientId": 2065,
"clientId": 475,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 95
},
"destinationClient": {
"clientId": 475,
"clientName": "redacted",
"displayName": "redacted"
},
"userName": {
"userName": "redacted",
"userId": 1
},
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
},
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
}
]
}
}
]
}
curl --location --request POST 'https://my-server/webconsole/api/JobDetails' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"jobId": 6165078
}'

{
"job": {
"jobDetail": {
"detailInfo": {
"sizeOfApplication": "18046737",
"dataWritten": "3115157",
"numOfObjects": 3,
"startTime": 1625508087,
"skippedItems": 0,
"workflowInputsXml": "",
"failures": "0 Folders, 0 Files",
"transferTime": "5",
"unCompressedBytes": 18046737,
"dataXferedNetwork": "3138344",
"numOfStreams": 2,
"sizeOfMediaOnDisk": 3115157,
"savingsPercent": "82.74",
"throughPut": "12.10",
"endTime": 1625508138,
"compressedBytes": 3074165,
"xmlJobInfo": {
"adminJobInfo": {},
"rstJobInfo": {},
"bkpJobInfo": {
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
},
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
}
]
}
}
},
"generalInfo": {
"agingOn": 0,
"vsaParentJobID": 0,
"opType": 18,
"useScalableResourceAllocation": "No",
"readThroughtputInMBPerSec": 0,
"totalFilesToDownload": 0,
"jobStartedBy": "redacted",
"writeThroughtputInMBPerSec": 0,
"backupOption": 0,
"priority": 166,
"jobId": 6165078,
"operationType": "Application Command Line Backup",
"verificationType": 2,
"scanType": 0,
"snapToTapeStatus": 0,
"backupType": "Incremental",
"jobStartedFrom": "Third Party",
"startTime": 1625508087,
"jobIdActedOn": 0,
"mediaInventoryType": 0,
"snapDeferredCatalogStatus": 0,
"dataVerificationType": 3,
"softwareCompression": "Storage Policy",
"systemState": "No",
"encrypted": "No",
"dataSizeInMB": 0,
"workflow": {
"workflowName": ""
},
"mediaLibrary": {
"libraryId": 0
},
"destInstance": {
"instanceName": "",
"instanceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"displayName": "redacted",
"backupsetId": 873,
"instanceId": 115,
"subclientId": 2065,
"clientId": 475,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"DDBdetails": {
"sidbStoreId": 0
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 95
},
"destinationClient": {
"clientId": 0
},
"commcell": {
"commCellId": 2
}
},
"progressInfo": {
"reasonForJobDelay": "",
"state": "Completed",
"numOfFilesTransferred": 3
}
}
}
}

 

 

The data job seems to be similar:

curl -k --location --request GET 'https://my-server/webconsole/api/Job/6159575' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken'

{
"totalRecordsWithoutPaging": 1,
"jobs": [
{
"jobSummary": {
"sizeOfApplication": 42622302,
"vsaParentJobID": 0,
"commcellId": 2,
"backupSetName": "default",
"opType": 18,
"totalFailedFolders": 0,
"totalFailedFiles": 0,
"alertColorLevel": 0,
"isVisible": true,
"localizedStatus": "Completed",
"isAged": false,
"totalNumOfFiles": 4,
"jobId": 6159575,
"sizeOfMediaOnDisk": 3724490,
"currentPhase": 0,
"status": "Completed",
"lastUpdateTime": 1625497731,
"percentSavings": 91.2616,
"localizedOperationName": "Application Command Line Backup",
"statusColor": "black",
"errorType": 0,
"backupLevel": 2,
"jobElapsedTime": 506,
"jobStartTime": 1625497225,
"jobType": "Backup 3RD",
"isPreemptable": 0,
"backupLevelName": "Incremental",
"attemptStartTime": 0,
"appTypeName": "SAP for MAX DB",
"percentComplete": 100,
"localizedBackupLevelName": "Incremental",
"subclientName": "(command line)",
"destClientName": "redacted",
"jobEndTime": 1625497731,
"dataSource": {
"dataSourceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"backupsetId": 873,
"commCellName": "redacted",
"instanceId": 115,
"subclientId": 2065,
"clientId": 475,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 95
},
"destinationClient": {
"clientId": 475,
"clientName": "redacted",
"displayName": "redacted"
},
"userName": {
"userName": "redacted",
"userId": 1
},
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
},
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
}
]
}
}
]
}
curl --location --request POST 'https://my-server/webconsole/api/JobDetails' \
--header 'Accept: application/json' \
--header 'Authtoken: QSDK MyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"jobId": 6159575
}'

{
"job": {
"jobDetail": {
"detailInfo": {
"sizeOfApplication": "42622302",
"dataWritten": "3724490",
"numOfObjects": 4,
"startTime": 1625497225,
"skippedItems": 0,
"workflowInputsXml": "",
"failures": "0 Folders, 0 Files",
"transferTime": "70",
"unCompressedBytes": 42622302,
"dataXferedNetwork": "3778608",
"numOfStreams": 2,
"sizeOfMediaOnDisk": 3724490,
"savingsPercent": "91.26",
"throughPut": "2.04",
"endTime": 1625497731,
"compressedBytes": 3619658,
"xmlJobInfo": {
"adminJobInfo": {},
"rstJobInfo": {},
"bkpJobInfo": {
"clientGroups": [
{
"_type_": 28,
"clientGroupId": 77,
"clientGroupName": "Clients For Commserv LiveSync"
},
{
"_type_": 28,
"clientGroupId": 15,
"clientGroupName": "External Clients for Failover"
},
{
"_type_": 28,
"clientGroupId": 38,
"clientGroupName": "MaxDB_Clients"
}
]
}
}
},
"generalInfo": {
"agingOn": 0,
"vsaParentJobID": 0,
"opType": 18,
"useScalableResourceAllocation": "No",
"readThroughtputInMBPerSec": 0,
"totalFilesToDownload": 0,
"jobStartedBy": "redacted",
"writeThroughtputInMBPerSec": 0,
"backupOption": 0,
"priority": 166,
"jobId": 6159575,
"operationType": "Application Command Line Backup",
"verificationType": 2,
"scanType": 0,
"snapToTapeStatus": 0,
"backupType": "Incremental",
"jobStartedFrom": "Third Party",
"startTime": 1625497225,
"jobIdActedOn": 0,
"mediaInventoryType": 0,
"snapDeferredCatalogStatus": 0,
"dataVerificationType": 3,
"softwareCompression": "Storage Policy",
"systemState": "No",
"encrypted": "No",
"dataSizeInMB": 0,
"workflow": {
"workflowName": ""
},
"mediaLibrary": {
"libraryId": 0
},
"destInstance": {
"instanceName": "",
"instanceId": 0
},
"subclient": {
"clientName": "redacted",
"instanceName": "redacted",
"displayName": "redacted",
"backupsetId": 873,
"instanceId": 115,
"subclientId": 2065,
"clientId": 475,
"appName": "SAP for MAX DB",
"backupsetName": "default",
"applicationId": 79,
"subclientName": "(command line)"
},
"DDBdetails": {
"sidbStoreId": 0
},
"storagePolicy": {
"storagePolicyName": "redacted",
"storagePolicyId": 95
},
"destinationClient": {
"clientId": 0
},
"commcell": {
"commCellId": 2
}
},
"progressInfo": {
"reasonForJobDelay": "",
"state": "Completed",
"numOfFilesTransferred": 4
}
}
}
}

 

 

Userlevel 5
Badge +13

Hi @Bjoern_SRZC 

Thanks for the details.

But unfortunately, this API today is not returning the info required to identify if the job is a Data job or Log job for MaxDB. We will need code changes to get that info.

 

Thanks,

Sunil-

Userlevel 7
Badge +23

@Sunil , should @Bjoern_SRZC open an incident to get this tracked, or do you have enough to get the changes going?

Userlevel 5
Badge +13

@Mike Struening 

I’d suggest a CMR to be created to get this change tracked.

 

Thanks,

Sunil-

 

Userlevel 7
Badge +23

@Sunil , I created CMR 322339 for this issue.  Since the form size is limited, I referred to this thread for details including the API call and result.

Thanks!!

Reply