복제 작업은 데이터를 복제 대상에 복제하는 규칙을 정의합니다. 다음 명령은 복제 작업을 관리합니다.
복제 작업 관리 요청은 프로젝트 또는 공유를 지정하지 않고 어플라이언스에 대해 직접적으로 생성될 수 있습니다.
다음 표에서는 복제 작업을 관리하는 기본 명령을 보여줍니다.
|
다음 표에서는 복제 작업 일정을 관리하는 명령을 보여줍니다.
|
다음 표에서는 복제 자동 스냅샷 관리 명령을 보여줍니다.
|
다음 표에는 복제 작업 통계 명령이 나와 있습니다.
|
복제 작업 관리 요청은 특정 프로젝트, 파일 시스템 또는 LUN 컨텍스트에서 생성될 수도 있습니다.
다음 표에서는 복제 작업을 관리하는 기본 명령을 보여줍니다.
프로젝트 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project
파일 시스템 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/filesystems/filesystem
LUN 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/luns/lun
복제 작업을 관리하려면 위에 나열된 원하는 컨텍스트 URI에 다음 기본 명령을 추가하십시오.
|
다음 표에는 복제 일정을 관리하는 기본 명령이 나와 있습니다.
프로젝트 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project
파일 시스템 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/filesystems/filesystem
LUN 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/luns/lun
복제 일정을 관리하려면 위에 나열된 원하는 컨텍스트 URI에 다음 기본 명령을 추가하십시오.
|
다음 표에는 복제 자동 스냅샷 구성을 관리하는 기본 명령이 나와 있습니다.
프로젝트 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project
파일 시스템 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/filesystems/filesystem
LUN 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/luns/lun
복제 자동 스냅샷 구성을 관리하려면 위에 나열된 원하는 컨텍스트 URI에 다음 기본 명령을 추가하십시오.
|
다음 표에는 복제 작업 통계에 액세스하는 기본 명령이 나와 있습니다.
프로젝트 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project
파일 시스템 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/filesystems/filesystem
LUN 기반 작업 URI는 다음으로 시작합니다.
/api/storage/v{1|2}/pools/pool/projects/project/luns/lun
복제 작업 통계에 액세스하려면 위에 나열된 원하는 컨텍스트 URI에 다음 기본 명령을 추가하십시오.
|
사용 가능한 복제 작업 목록을 가져옵니다.
요청 예:
GET /api/storage/v2/replication/actions HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= 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/v2/replication/actions/1438ed7f-aad3-c631-d869-9e85cd7f15b4 HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= 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/v2/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": "p1",
"project": "proj-01",
"retain_user_snaps_on_target": false,
"share": "fs1",
"state": "sending",
"target": "38094753-6c90-49ed-aa92-995a296d432a",
"use_ssl": true
}
}
요청 예:
다음 복제 작업 응답은 RPO(복구 지점 목표) 예와 관련 복제본 지연 경고 및 경보를 보여줍니다.
GET /api/storage/v2/replication/actions HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Content-Type:application/json
결과 예:
HTTP/1.1 200 OK
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 529
{
"action": {"id": "12d981c3-b098-c65a-e1e9-a6b8263a0f6a",
"target_id": "4fd305ac-4af5-c34a-87c3-88203207305b",
...
"replica_lag": "42:25:31",
"recovery_point_objective": 0,
"replica_lag_warning_alert": 0,
"replica_lag_error_alert": 0,
"replica_lag_over_warning_limit": false,
"replica_lag_over_error_limit": false,
"project": "default"
}
}
새 복제 작업을 만듭니다.
등록 정보를 만듭니다.
Initial values:
target = cleo
enabled = true
continuous = false
include_snaps = true
retain_user_snaps_on_target = false
dedup = true
include_clone_origin_as_data = false
max_bandwidth = unlimited
bytes_sent = 0
estimated_size = 0
estimated_time_left = 0
average_throughput = 0
use_ssl = true
compression = on
요청 예:
POST /api/storage/v2/replication/actions HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Content-Type: application/json
Content-Length: 121
Accept: application/json
{
"pool": "p1",
"project": "proj-01",
"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/v2/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,
"dedup": false,
"max_bandwidth": 0,
"collection": "local",
"estimated_size": 0.0,
"state": "idle",
"href": "/api/storage/v2/replication/pools/p1/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": "p1",
"include_clone_origin_as_data": false,
"include_snaps": true
}
}
복제 작업에 대한 일정을 만듭니다.
요청 예:
POST /api/storage/v2/replication/actions/b77bd8cd-17ed-69da-9e4b-aebe3cc63755/schedules HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Accept: */*
Content-Type:application/json
Content-Length: 65
{"frequency":"month","day":"5th", "hour":"auto", "minute":"auto"}
결과 예:
HTTP/1.1 201 Created Date: Thu, 12 Jan 2017 17:35:48 GMT Server: TwistedWeb/192.0.2 Content-Length: 0 X-Zfssa-Storage-Api: 1.1 Content-Type: application/json; charset=utf-8 X-Zfssa-Api-Version: 1.0 X-Zfssa-Version: user/generic@2016.12.08,1-0
기존 복제 작업을 수정합니다.
요청 예:
PUT /api/storage/v2/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
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/v2/replication/actions/action_id -d '{"recovery_point_objective": 60}HTTP/1.1
Host: zfs-storage.example.com:215
Authorization: Basic Tm8gcGVla2luZyE=
Content-Type: application/json
결과 예:
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 620
{
"action": {
"state_description": "Idle (no update in progress)",
"recovery_point_objective": 60,
"replica_lag_over_warning_limit": false,
"bytes_sent": "0",
"last_try": "Mon Nov 21 2016 23:25:59 GMT+0000 (UTC)",
"max_bandwidth": 0,
"estimated_size": "0",
"href": "/api/storage/v2/replication/actions/12d981c3-b098-c65a-e1e9-a6b8263a0f6a",
"estimated_time_left": 0,
"use_ssl": true,
"id": "12d981c3-b098-c65a-e1e9-a6b8263a0f6a",
"stats": {"total_logical_bytes": 40656,
"last_dd_table_build": 9169029,
"total_after_dedup": 18476,
"last_try": "Mon Nov 21 2016 23:25:59 GMT+0000 (UTC)",
"dd_total_updates": 1,
"href": "/api/storage/v2/replication/actions/12d981c3-b098-c65a-e1e9-a6b8263a0f6a/stats",
"dd_total_duration": 47149245470,
"last_logical_bytes": 40656,
"dd_total_table_mem": 2097152,
"last_result": "success",
"last_after_dedup": 18476,
"last_duration": 47149245470,
{"dd_total_logical_bytes": 40656,
"total_updates": 1,
"total_duration": 47149245470,
"replica_data_timestamp": "Mon Nov 21 2016 23:25:12 GMT+0000 (UTC)",
"total_to_network": 9623,
"dd_total_table_build": 9169029,
"dd_total_phys_bytes": 16800,
"last_to_network": 9623,
"total_phys_bytes": 16800,
"last_phys_bytes": 16800,
"last_sync": "Mon Nov 21 2016 23:25:59 GMT+0000 (UTC)",
"last_dd_table_mem": 2097152,
"dd_total_after_dedup": 18476,
"dd_total_to_network": 9623},
"compression": "on",
"dedup": true,
"replica_lag_warning_alert": 0,
"last_result": "success",
"include_clone_origin_as_data": false,
"state": "idle",
"offline": false,
"export_path": "",
"export_pending": false,
"autosnaps": {"autosnaps_retention_policies":
"synchronized",
"href": "/api/storage/v2/replication/actions/12d981c3-b098-c65a-e1e9-a6b8263a0f6a/autosnaps"},
"replica_data_timestamp": "Mon Nov 21 2016 23:25:12 GMT+0000 (UTC)",
"continuous": false,
"target_id": "4fd305ac-4af5-c34a-87c3-88203207305b",
{"average_throughput": "0B/s",
"next_update": "Sync now",
"pool": "p1",
"replica_lag_over_error_limit": false,
"target": "pool1",
"replica_lag": "42:28:24",
"retain_user_snaps_on_target": false,
...
}
}
복제 작업 상태 가져오기 명령은 해당 ID에 의해 지정된 단일 복제 작업의 상태를 반환합니다. 복제 진행률을 확인하려면 state 및 state_description을 검토하십시오.
state 등록 정보 값:
sending
idle
state_description 등록 정보 값:
Connecting to replication target
Receiving checkpoint from target
Estimating size of update
Building deduplication tables
이 등록 정보 값은 중복 제거된 복제 스트림에만 사용됩니다.
요청 예:
GET /api/storage/v2/replication/actions/1438ed7f-aad3-c631-d869-9e85cd7f15b4 HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE= Accept: application/json
결과 예:
HTTP/1.1 200 OK
X-Zfssa-Replication-Api: 1.0
Content-Type: application/json
Content-Length: 529
{
"action": {
"id": "1438ed7f-aad3-c631-d869-9e85cd7f15b4",
"target_id": "4fd3483e-b1f5-4bdc-9be3-b3a4becd0c42",
"target": "cleo",
"pool": "p0",
"replication_of": "testproj",
"enabled": true,
"continuous": false,
"include_snaps": true,
"retain_user_snaps_on_target": false,
"dedup": true,
"include_clone_origin_as_data": false,
"max_bandwidth": -1,
"bytes_sent": 0,
"estimated_size": 0,
"estimated_time_left": 0,
"average_throughput": 0,
"use_ssl": true,
"compression": "on",
"export_path": "",
"state": "sending",
"state_description": "Receiving checkpoint from target",
"export_pending": false,
"offline": false,
"next_update": "Sync now",
"replica_data_timestamp": "Thu Apr 28 2016 22:38:03 GMT+0000 (UTC)",
"last_sync": "<unknown>",
"last_try": "<unknown>",
"last_result": "<unknown>",
"replica_lag": "00:00:18",
"recovery_point_objective": 0,
"replica_lag_warning_alert": 0,
"replica_lag_error_alert": 0,
"replica_lag_over_warning_limit": false,
"replica_lag_over_error_limit": false,
"project": "testproj"
}
}
진행 중인 복제 업데이트를 취소합니다.
요청 예:
PUT /api/storage/v2/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc/cancelupdate HTTP/1.1 Host: zfs-storage.example.com:215 Authorization: Basic Tm8gcGVla2luZyE=
결과 예:
HTTP/1.1 202 Accepted X-Zfssa-Replication-Api: 1.0
복제 업데이트를 가능한 한 빨리 시작하도록 예약합니다.
요청 예:
PUT /api/storage/v2/replication/actions/c141d88d-ffd2-6730-d489-b71905f340cc/sendupdate HTTP/1.1 Authorization: Basic Tm8gcGVla2luZyE=
결과 예:
HTTP/1.1 202 Accepted X-Zfssa-Replication-Api: 1.0
기존 복제 작업을 삭제합니다.
요청 예:
DELETE /api/storage/v2/replication/actions/e7e688b1-ff07-474f-d5cd-cac08293506e HTTP/1.1 Host: zfs-storage.example.com:215 Authorization: Basic Tm8gcGVla2luZyE=
성공한 삭제는 HTTP 상태 204(No Content)를 반환합니다.
결과 예:
HTTP/1.1 204 No-Content X-Zfssa-Replication-Api: 1.0