レプリケーションアクションは、レプリケーションターゲットにデータをレプリケートするための規則を定義します。次のコマンドは、レプリケーションアクションを管理します。
|
すべての使用可能なレプリケーションアクションのリストを取得します。
リクエストの例:
GET /api/storage/v1/replication/actions HTTP/1.1 Authorization: Basic ab6rt4psMWE= Accept: application/json
レスポンスの例:
HTTP/1.1 200 OK
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 529
{
"actions": [{
"href": ""
...
}, {
"href": "",
...
}]
}
レプリケーションアクションステータスの取得コマンドは、ID で指定された単一のレプリケーションアクションのステータスを返します。
リクエストの例:
GET /api/storage/v1/replication/actions/1438ed7f-aad3-c631-d869-9e85cd7f15b4 HTTP/1.1 Authorization: Basic ab6rt4psMWE= Accept: application/json
レスポンスの例:
HTTP/1.1 200 OK
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 529
{
"action": {
"average_throughput": 0.0,
"bytes_sent": 0.0,
"collection": "local",
"compression": true,
"continuous": false,
"enabled": true,
"estimated_size": 0.0,
"estimated_time_left": 0.0,
"href": "/api/storage/v1/replication/actions",
"id": "8373d331-de60-e590-90e8-9ad69fcb4aec",
"include_clone_origin_as_data": false,
"include_snaps": true,
"last_sync": "20130916T21:36:50",
"last_try": "20130916T21:36:50",
"max_bandwidth": 0,
"pool": "gold",
"project": "blah1",
"retain_user_snaps_on_target": false,
"share": "fs1",
"state": "sending",
"target": "38094753-6c90-49ed-aa92-995a296d432a",
"use_ssl": true
}
}
新しいレプリケーションアクションを作成します。
プロパティーの作成:
Initial values:
target = (unset)
pool = (unset)
enabled = true
continuous = false
include_snaps = true
max_bandwidth = unlimited
bytes_sent = 0
estimated_size = 0
estimated_time_left = 0
average_throughput = 0
use_ssl = true
compression = true
retain_user_snaps_on_target = false
include_clone_origin_as_data = false
リクエストの例:
POST /api/storage/v1/replication/actions HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 121
Accept: application/json
{
"pool": "gold",
"project": "blue1",
"share": "fs1",
"target_pool": "pool1",
"target": "38094753-6c90-49ed-aa92-995a296d432a"
}
レスポンスの例:
HTTP/1.1 201 Created
Content-Length: 506
Content-Type: application/json
Location: /api/storage/v1/replication/action/8373d331-de60-e590-90e8-9ad69fcb4aec
X-Zfssa-Replication-Api: 1.0
{
"action": {
"project": "blue1",
"target": "38094753-6c90-49ed-aa92-995a296d432a",
"bytes_sent": 0.0,
"compression": true,
"continuous": false,
"enabled": true,
"max_bandwidth": 0,
"collection": "local",
"estimated_size": 0.0,
"state": "idle",
"href": "/api/storage/v1/replication/pools/gold/projects/blah1/shares/fs1/
actions/8373d331-de60-e590-90e8-9ad69fcb4aec",
"average_throughput": 0.0,
"use_ssl": true,
"estimated_time_left": 0.0,
"retain_user_snaps_on_target": false,
"share": "fs1",
"id": "8373d331-de60-e590-90e8-9ad69fcb4aec",
"pool": "gold",
"include_clone_origin_as_data": false,
"include_snaps": true
}
}
既存のレプリケーションアクションを変更します。
リクエストの例:
PUT /api/storage/v1/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
{"use_ssl": false}
レスポンスの例:
HTTP/1.1 202 Accepted
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 620
{
"action": {
"target_id": "407642ae-91b5-681c-de5e-afcd5cbf2974",
"compression": true,
"continuous": false,
"enabled": true,
"max_bandwidth": 0,
"dedup": false,
"retain_user_snaps_on_target": false,
"use_ssl": false,
"id": "c141d88d-ffd2-6730-d489-b71905f340cc",
"include_clone_origin_as_data": false,
"include_snaps": true
}
}
進行中のレプリケーション更新を取り消します。
リクエストの例:
PUT /api/storage/v1/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc/cancelupdate HTTP/1.1 Host: zfs-storage.example.com Authorization: Basic ab6rt4psMWE=
レスポンスの例:
HTTP/1.1 202 Accepted X-Zfssa-Replication-Api: 1.0
レプリケーション更新を可能なかぎりすぐに開始するようにスケジュールします。
リクエストの例:
PUT /api/storage/v1/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc/sendupdate HTTP/1.1 Authorization: Basic ab6rt4psMWE=
レスポンスの例:
HTTP/1.1 202 Accepted X-Zfssa-Replication-Api: 1.0
既存のレプリケーションアクションを削除します。
リクエストの例:
DELETE /api/storage/v1/replication/actions/e7e688b1-ff07-474f-d5cd-cac08293506e
HTTP/1.1
Host: zfs-storage.example.com
Authorization: Basic ab6rt4psMWE=
削除に成功すると、HTTP ステータス 204 (No Content) が返されます。
レスポンスの例:
HTTP/1.1 204 No-Content X-Zfssa-Replication-Api: 1.0