NetBackup™ Web UI Apache Cassandra 管理者ガイド

Last Published:
Product(s): NetBackup & Alta Data Protection (10.4)

API を使用した Cassandra 資産の管理、保護、リカバリ

このマニュアルでは、Cassandra 作業負荷操作の NetBackup API について詳しく説明します。操作には、資産管理、フィルタ処理、ソート、リカバリ管理、保護計画管理が含まれます。各 API エンドポイントについて、このマニュアルで要求、応答、エラー、ペイロードについての詳しい情報を示します。

API について詳しくは、次を参照してください。

Cassandra 資産の作成または更新

API は要求された Cassandra 資産 (Cassandra クラスタ、Cassandra ノード、DSS クラスタ、DSS ノード) を作成します。

要求ペイロードには、単一の資産または資産の組み合わせに関する詳細情報を含めることができます。Cassandra 資産は、次の 2 つの手順で作成または更新できます。

  • 生成された ID を取得するには、POST 要求を行う必要があります。

  • 資産をデータベースに保存する GET 要求を行う必要があります。

表: 1. Cassandra クラスタと Cassandra ノードの要求パラメータ

API

重要な変数とオプション

https://PrimaryerverName

/netbackup/asset-service/queries/
  • Workloads: Cassandra

  • assetType: 資産タイプ - cluster を定義します

  • credentialName: 資産サービスに使用されるクレデンシャル名。

  • workloadType: Cassandra

  • clusterName: 有効な Cassandra クラスタ名。

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: Cassandra

  • assetType: 資産タイプ - node を定義します

  • workloadType: Cassandra

表: 2. 3. データステージングクラスタとノードの要求パラメータ

API

重要な変数とオプション

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: Cassandra

  • assetType: 資産タイプ - cluster、node、dataStagingCluster を定義します

  • workloadType: Cassandra

  • clusterName: 有効な Cassandra クラスタ名。

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: Cassandra

  • assetType: 資産タイプ - dataStagingNode を定義します。

  • workloadType: Cassandra

表: 応答パラメータ

API

重要な変数とオプション

https://PrimaryServerName
/netbackup/asset-service/queries/
Response parameters
  • type クエリーの応答タイプの名前。

  • id: 資産の作成または変更の応答 ID

  • links: 資産リンク全体

メソッド: Get

資産はこの API を使用して NetBackup データベースに格納されます。URL に有効な資産応答 ID を持つ GET メソッドを使用します。

表: データベースへの資産の格納の応答

API

重要な変数とオプション

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Response ID
  • id: 資産の作成または更新のクエリーに対する応答資産 ID

  • status: 資産の応答状態 - 成功、失敗、進行中

  • percentComplete: 完了率

  • totalWorkItems: 応答項目数

  • totalSuccessfulWorkItems: 成功項目数

  • totalFailedWorkItems: 失敗項目数

  • totalInProgressWorkItems

資産ペイロードの削除

この API を使用して、特定の資産またはすべての資産を NetBackup データベースから削除できます。ノードや dataStagingNode などの個々の assetType を削除できます。この API を使用して assetType をクラスタまたは dataStagingCluster として削除すると、クラスタまたは dataStagingCluster に関連付けられているすべての対応する子ノードが削除されます。

表: 資産を削除するための要求ペイロード

API オプション

重要な変数とオプション

https://PrimaryServerName
/netbackup/asset-service/queries
  • type クエリーの応答タイプの名前。

  • queryName 異なる資産を作成または更新するためのクエリーの名前

  • workloads - Cassandra

  • correlationId - 作業項目を追跡するための識別子です

  • id - 資産に割り当てられた ID

  • assetType - 資産のタイプ {node、dataStagingNode、dataStagingCluster、cluster}

データベースから資産を削除するための要求ペイロード

データベース資産は、この API を使用して削除できます。これは、前回の要求から受け取った削除応答 ID と組み合わせて使用される 2 番目の要求です。

表:

メソッド

URL

GET

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Delete Response ID

例: bcc0eb1f-6613-427d-8101-19376fd689f7

表: データベースからの資産の削除の応答

API

重要な変数とオプション

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Delete Response ID

例: bcc0eb1f-6613-427d-8101-19376fd689f7

  • type 操作応答タイプの名前

  • id - 汎用削除資産の応答 ID

  • status - 資産の応答状態 - 成功

  • percentComplete - 完了率

  • totalWorkItems - 応答作業項目の合計数

  • totalSuccessfulWorkItems - 成功作業項目の合計数

  • totalFailedWorkItems - 失敗作業項目の合計数

  • totalInProgressWorkItems - 進行中作業項目の合計数

  • correlationId - 作業項目を追跡するための識別子です

  • status - 資産の応答状態

  • message - 資産の応答メッセージ

  • percentComplete - 完了率

  • offset

  • limit

  • hasNext

  • first

表: すべての資産の取得の要求

https://PrimaryServerName
/netbackup/asset-service/
workloads/cassandra/assets

Assets

すべての資産の取得の応答

すべての資産はデフォルトの降順で一覧表示されます。応答パラメータの詳細については、ID 別の資産の取得テーブルを参照してください。ID 別の資産の取得テーブルに従って、すべての資産がデフォルトの降順で一覧表示されます。

ID 別の資産の取得

この API を使用して、特定の資産の詳細を取得できます。この API を使用して、特定の資産に関する詳細を取得できます。

メソッド: GET

表:

API

重要な変数とオプション

https://PrimaryServerName/
netbackup/asset-service/workloads/
cassandra/assets/Asset ID
  • type - 操作応答タイプの名前

  • id - 汎用削除資産の応答 ID

  • assetType - 資産のタイプを定義します

  • displayName - 資産の名前

  • providerGeneratedId - 資産の自動生成された ID

https://PrimaryServerName/
netbackup/asset-service/workloads/
cassandra//Asset ID
  • parentProviderGeneratedId - ノードと dataStagingNodes の自動生成された ID

  • clusterName - cassndra

フィルタ

フィルタは、次の API エンドポイントのいずれでも適用できます。

  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'dataStagingCluster'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'dataStagingNode'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node' and parentProviderGeneratedId eq '
    CASSANDRA_cluster_Cassandra10'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and commonAssetAttributes/
    providerGeneratedId eq 'CASSANDRA_cluster_Cassandra1'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    dataStagingClusterName eq 'DSS1'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    backupDataCenterName eq 'earthCenter'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node' and 
    nodeIp eq '10.221.110.234'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=(assetType eq 'cluster') and 
    (contains(tolower(clusterName), 'cassandra1'))
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=(assetType eq 'cluster') and 
    (clusterName eq 'Cassandra1')&meta=accessControlId
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    clusterName eq 'Cassandra10'

表:

フィルタ

パラメータ

フィルタ基準

説明

assetType/
queryName/
workloads/
correlationId/
credentialName/
workloadType/
displayName/
clusterName/
dataStaging
ClusterName/
backupData
CenterName/
nodeDownThreshold
Percentage/
parentProvider
Generated

eq

cluster, node, dataStagingCluster and dataStagingNode

資産タイプに基づく資産フィルタ

eq

'node' and parentProviderGeneratedId

eq 'CASSANDRA_cluster_Cassandra1'

 

eq

'cluster' and commonAssetAttributes/

providerGeneratedId eq 'CASSANDRA_cluster_Cassandra1'

 

eq

'cluster' and dataStagingClusterName

eq 'DSS1'

 

eq

'cluster' and backupDataCenterName

eq 'earthCenter'

 

eq

'node' and nodeIp

eq '10.221.105.94'

 

eq

(assetType eq 'cluster') and

(contains(tolower(clusterName), 'cassandra1'))

 

eq

(assetType eq 'cluster') and

(clusterName eq

'Cassandra1')&meta=accessControlId

 
ソート

ソートは、次の API エンドポイントのいずれでも適用できます。

  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=clusterName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=-clusterName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=commonAssetAttributes.
    credentials.credentialName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=-commonAssetAttributes
    .credentials.credentialName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'&sort=
    parentProviderGeneratedId
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'&sort=
    -parentProviderGeneratedId

表:

フィルタパラメータ

フィルタ基準

説明

assetType

eq

cluster'&sort=clusterName

 

assetType

eq

node and parentProviderGeneratedId eq 'CASSANDRA_cluster_Cassandra1

 

assetType

eq

cluster'&sort=

commonAssetAttributes

.credentials.credentialName

 

assetType

eq

'cluster'&sort=-commonAssetAttributes.

credentials.credentialName

 

assetType

eq

'node'&sort=

 

assetType

eq

parentProvider

GeneratedId

 

assetType

eq

'node'

&sort=-parentProvider

GeneratedId

 
保護計画

次の API は、関連付けられた資産で実際のバックアップ操作をトリガするために使用されるポリシーを作成または更新します。これらの API は、増分バックアップと完全バックアップの両方のポリシーを作成または更新するのに役立ちます。作成されたポリシーに基づいて、提供されたスケジュールの詳細にしたがってバックアップジョブが自動的にトリガされます。

表: SLO の作成: 完全および差分増分

メソッド

Post

https://PrimaryServerName/
netbackup/servicecatalog/slos
 

表: SLO を作成するための要求ペイロード:

API

重要な変数とオプション

https://PrimaryServerName
/netbackup/servicecatalog/slos
  • name

  • scheduleType

  • backupStorageUnit

  • dayOfWeek

  • startSeconds

  • durationSeconds

  • frquencySeconds

  • workloadType

  • policyNamePrefix

  • policyDefinition

表: SLO の作成の応答

API

重要な変数とオプション

https://PrimaryServerName/
netbackup/servicecatalog/slos
  • 201 - SLO 定義が正常に作成されました。

  • 400 不正な要求

  • 401 - 認証ヘッダーがない、トークンが無効、またはこの操作の権限がありません。

  • 409 - 同じ名前の SLO がすでに存在します。

  • 500 - 予期しないシステムエラーが発生しました。

サブスクリプションの作成

表:

メソッド

Post

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
 

表: サブスクリプションを作成するための要求ペイロード:

API

重要な変数とオプション

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
  • selectionId

  • selectionType

表: サブスクリプションの作成の応答

API

重要な変数とオプション

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
  • 201 - サブスクリプションが正常に作成されました

  • 400 不正な要求

  • 401 - 認証ヘッダーがない、トークンが無効、またはこの操作の権限がありません。

  • 409 - 同じ名前の SLO がすでに存在します。

  • 500 - 予期しないシステムエラーが発生しました。

検出

検出 API は、指定された資産に対する検出の実際の開始または停止に対応します。

表: 検出の開始

API

重要な変数とオプション

https://{{HOSTNAME}}/netbackup/
admin/discovery/workloads/cassandra/start
  • Data

  • Type

  • Attribute

  • serverName

表: 検出の停止

API

重要な変数とオプション

https://{{HOSTNAME}}/netbackup/admin/
discovery/workloads/cassandra/stop
  • Data

  • Type

  • Attribute

  • serverName

リカバリ要求

リカバリ API は、リカバリポイント、ソース、宛先などの詳細に基づいて、特定の Cassandra 資産の実際のリカバリに対応します。

表:

API

重要な変数とオプション

POST /recovery/workloads/cassandra/
scenarios/cluster/recover
  • Data

  • Type

  • Attribute

  • recoveryPoint

  • client

  • filter

  • backupId

  • recoveryObject

  • clusterNewName

  • recoveryOptions

  • backupHost

  • additionalBackupHosts

  • nbu-backup-host2

  • nbu-backup-host3

  • nbu-backup-host4

  • overwrite

  • restoreSelections

  • selectionType

  • selectionCriteria

  • keyspace

表: リカバリ API の応答

API

重要な応答コード

POST /recovery/workloads/cassandra/
scenarios/cluster/recover
  • 201 - リカバリジョブが正常に開始されました。

  • 400 - 一部の必須属性が見つからなかったか、指定されたクライアント、バックアップイメージ、または入力 JSON が無効です。

  • 401 - 認証ヘッダーがない、トークンが無効、またはこの操作の権限がありません。

  • 404 - 指定されたクライアントまたはバックアップイメージが見つかりませんでした

  • 406 - 承認タイプが無効です。Accept ヘッダーがこの API で生成される内容と一致することを確認してください。

  • 415 - サポートされていないメディア形式。Content-Type ヘッダーで指定されたメディア形式は、この API でサポートされていません。

  • 500 - 内部サーバーエラーが発生しました。リカバリの開始に失敗しました。

  • 503 - サーバーがビジー状態です。リカバリの開始に失敗しました。