Go to main content

Oracle® ZFS Storage Appliance RESTful API 설명서, 릴리스 OS8.8.x

인쇄 보기 종료

업데이트 날짜: 2021년 8월
 
 

복제 작업

복제 작업은 데이터를 복제 대상에 복제하는 규칙을 정의합니다. 다음 명령은 복제 작업을 관리합니다.

일반 작업 인터페이스 사용

복제 작업 관리 요청은 프로젝트 또는 공유를 지정하지 않고 어플라이언스에 대해 직접적으로 생성될 수 있습니다.

다음 표에서는 복제 작업을 관리하는 기본 명령을 보여줍니다.

표 57  기본 작업 인터페이스
요청
경로 /api/storage/v{1|2}에 추가
설명
GET
/replication/actions
모든 복제 작업 객체를 나열합니다.
GET
/replication/actions/ra_id
지정된 복제 작업 등록 정보를 가져옵니다.
PUT
/replication/actions/ra_id
지정된 복제 작업 객체를 수정합니다.
DELETE
/replication/actions/ra_id
지정된 복제 작업 객체를 삭제합니다.
PUT
/replication/actions/ra_id/sendupdate
선택된 복제 작업을 시작합니다.
PUT
/replication/actions/ra_id/cancelupdate
선택된 복제 작업을 중지합니다.

다음 표에서는 복제 작업 일정을 관리하는 명령을 보여줍니다.

표 58  작업 일정 액세스
요청
경로 /api/storage/v{1|2}에 추가
설명
GET
/replication/actions/ra_id/schedules
모든 복제 작업 일정 객체를 나열합니다.
GET
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 등록 정보를 가져옵니다.
POST
/replication/actions/ra_id/schedules
새 복제 작업 일정을 만듭니다.
PUT
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 객체를 수정합니다.
DELETE
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 객체를 삭제합니다.

다음 표에서는 복제 자동 스냅샷 관리 명령을 보여줍니다.


주 -  프로젝트 레벨 복제 작업 내에 구성된 공유 레벨 자동 스냅샷 일정은 다음 명령을 사용하여 액세스할 수 없습니다. 프로젝트 레벨 작업의 경우 여러 공유에 여러 개의 자동 스냅샷 일정이 있을 수 있으며, 이 인터페이스는 모든 조합을 식별하는 한정적인 방법을 제공하지 않습니다.
표 59  복제 자동 스냅샷 구성 액세스
요청
경로 /api/storage/v{1|2}에 추가
설명
GET
/replication/actions/ra_id/autosnaps
선택한 복제 작업에 대한 자동 스냅샷 구성을 검색합니다.
GET
/replication/actions/ra_id/autosnaps/autosnaps_id
지정된 복제 작업 자동 스냅샷 객체를 가져옵니다.
PUT
/replication/actions/ra_id/autosnaps
지정된 복제 작업 자동 스냅샷 등록 정보를 수정합니다.
PUT
/replication/actions/ra_id/autosnaps/autosnaps_id
지정된 복제 작업 자동 스냅샷 객체를 수정합니다.
DELETE
/replication/actions/ra_id/autosnaps/autosnaps_id
지정된 복제 작업 자동 스냅샷 객체를 삭제합니다.

다음 표에는 복제 작업 통계 명령이 나와 있습니다.

표 60  복제 작업 통계 액세스
요청
경로 /api/storage/v{1|2}에 추가
설명
GET
/replication/actions/ra_id/stats
선택한 복제 작업에 대한 읽기 전용 복제 통계를 검색합니다.

프로젝트, 파일 시스템 또는 LUN 컨텍스트에서 복제 작업

복제 작업 관리 요청은 특정 프로젝트, 파일 시스템 또는 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에 다음 기본 명령을 추가하십시오.

표 61  프로젝트, 파일 시스템 또는 LUN 기본 복제 작업 인터페이스
요청
위에 나열된 프로젝트, 파일 시스템 또는 LUN URI에 추가
설명
GET
/replication/actions
모든 복제 작업 객체를 나열합니다.
GET
/replication/actions/ra_id
지정된 복제 작업 등록 정보를 가져옵니다.
POST
/replication/actions
새 복제 작업 만들기
PUT
/replication/actions/ra_id
지정된 복제 작업 객체를 수정합니다.
DELETE
/replication/actions/ra_id
지정된 복제 작업 객체를 삭제합니다.
PUT
/replication/actions/ra_id/sendupdate
선택된 복제 작업을 시작합니다.
PUT
/replication/actions/ra_id/cancelupdate
선택된 복제 작업을 중지합니다.

다음 표에는 복제 일정을 관리하는 기본 명령이 나와 있습니다.

  • 프로젝트 기반 작업 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에 다음 기본 명령을 추가하십시오.

표 62  프로젝트, 파일 시스템 또는 LUN 복제 작업 일정
요청
위에 나열된 프로젝트, 파일 시스템 또는 LUN URI에 추가
설명
GET
/replication/actions/ra_id/schedules
모든 복제 작업 일정 객체를 나열합니다.
GET
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 등록 정보를 가져옵니다.
POST
/replication/actions/ra_id/schedules
새 복제 작업 일정을 만듭니다.
PUT
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 객체를 수정합니다.
DELETE
/replication/actions/ra_id/schedules/ra_schedule
지정된 복제 작업 일정 객체를 삭제합니다.

다음 표에는 복제 자동 스냅샷 구성을 관리하는 기본 명령이 나와 있습니다.

  • 프로젝트 기반 작업 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에 다음 기본 명령을 추가하십시오.


주 -  프로젝트 레벨 복제 작업 내에 구성된 공유 레벨 자동 스냅샷 일정은 다음 프로젝트 기반 작업을 사용하여 액세스할 수 없습니다. 프로젝트 레벨 작업의 경우 여러 공유에 여러 개의 자동 스냅샷 일정이 있을 수 있으며, 이 인터페이스는 모든 조합을 식별하는 한정적인 방법을 제공하지 않습니다.
표 63  프로젝트, 파일 시스템, LUN 복제 자동 스냅샷 구성
요청
위에 나열된 프로젝트, 파일 시스템 또는 LUN URI에 추가
설명
GET
/replication/actions/ra_id/autosnaps
프로젝트/공유의 선택한 복제 작업에 대한 자동 스냅샷 구성을 검색합니다.
GET
/replication/actions/ra_id/autosnaps/autosnaps_id
프로젝트/공유의 지정된 복제 작업 자동 스냅샷 구성을 가져옵니다.
POST
/replication/actions/ra_id/autosnaps
프로젝트/공유의 레벨 복제 작업 자동 스냅샷 객체를 새로 만듭니다.
PUT
/replication/actions/ra_id/autosnaps
프로젝트/공유의 지정된 복제 작업 대상 자동 스냅샷 보존 정책을 수정합니다.
PUT
/replication/actions/ra_id/autosnaps/autosnaps_id
지정된 복제 작업 자동 스냅샷 객체를 수정합니다.
DELETE
/replication/actions/ra_id/autosnaps/autosnaps_id
지정된 복제 작업 자동 스냅샷 객체를 삭제합니다.

다음 표에는 복제 작업 통계에 액세스하는 기본 명령이 나와 있습니다.

  • 프로젝트 기반 작업 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에 다음 기본 명령을 추가하십시오.

표 64  복제 작업 통계 액세스
요청
위에 나열된 프로젝트, 파일 시스템 또는 LUN URI에 추가
설명
GET
/replication/actions/ra_id/stats
선택한 복제 작업에 대한 읽기 전용 복제 통계를 검색합니다.

복제 작업 나열

사용 가능한 복제 작업 목록을 가져옵니다.

요청 예:

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에 의해 지정된 단일 복제 작업의 상태를 반환합니다. 복제 진행률을 확인하려면 statestate_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