대용량 파일 관리 (DLO)
    • PDF

    대용량 파일 관리 (DLO)

    • PDF

    기사 요약

    Classic/VPC 환경에서 이용 가능합니다.

    • 대용량 파일을 관리하기 위한 절차를 설명합니다.
    • 대용량 파일을 여러 개의 segment object로 분할하여 동시에 업로드가 가능하며, 저장 가능한 최대 segment의 크기는 5GB입니다.
    • 따라서, 5GB 이상의 object은 반드시 분할하여 업로드 해야합니다.
    • segment object들은 매니페스트 파일을 생성하여 하나의 오브젝트로 접근가능하게 됩니다.
    • 매니페스트 파일에 segment object를 관리방식에 따라, Dynamic Large Object(DLO), Static Large Object(SLO) 2가지 방식이 있으며, 해당 가이드에서는 DLO 방식을 설명합니다.

    DLO 업로드

    1. 대용량 파일은 분할하여 업로드 가능합니다.
      API에서 파일 분할을 지원하지는 않습니다.
      분할 크기는 분할 갯수 10000개를 넘지 않은 크기로 정해야합니다.

    2. 분할된 파일들을 Segement Object로 업로드합니다.
      Segment Object들은 반드시 같은 컨테이너에 위치해야 합니다.
      Segment Object들은 이름에 동일한 prefix를 가져야 합니다.
      Segment Object의 이름의 정렬된 순서에 따라서 DLO로 연결됩니다. (예시 : 0001->0002->0003)
      Segment Object의 업로드는 일반 오브젝트 업로드와 같이 진행하시면 됩니다.

    3. DLO에 대한 매니페스트 파일을 업로드합니다.
      Segment Object들의 위치 정보를 가지고 있는 파일입니다.
      매니페스트 파일의 크기는 0입니다.
      X-Object-Manifest 헤더를 포함해야 하며, 헤더의 값은 Segment Object들의 위치입니다.(마지막에 '/' 값이 설정되어야 합니다)

    주의

    manifest object는 해당 object의 metadata를 갖고있으며 실제 데이터는 segment object에 링크되어 있습니다. 따라서, segment object 또는 manifest object 둘중 하나라도 삭제할 경우, object는 복구가 불가능합니다.

    자세한 내용은 아래 예시를 참조합니다.

    Segment Object 업로드(1바이트 파일 3개)

    curl -i -X PUT \
      https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/DLO/dlo-object/0001 \
      -H 'X-Auth-Token: $token' \
      --data-binary '1'
    
    HTTP/1.1 201 Created
    Last-Modified: Tue, 18 Sep 2018 06:20:35 GMT
    Content-Length: 0
    Etag: c4ca4238a0b923820dcc509a6f75849b
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx3f192e9948504e689285d-005ba09932
    X-Openstack-Request-Id: tx3f192e9948504e689285d-005ba09932
    Date: Tue, 18 Sep 2018 06:20:34 GMT
    
    curl -i -X PUT \
      https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/DLO/dlo-object/0002 \
      -H 'X-Auth-Token: $token' \
      --data-binary '2'
    
    HTTP/1.1 201 Created
    Last-Modified: Tue, 18 Sep 2018 06:23:38 GMT
    Content-Length: 0
    Etag: c81e728d9d4c2f636f067f89cc14862c
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx22f749319f844f3ebb0dc-005ba099e9
    X-Openstack-Request-Id: tx22f749319f844f3ebb0dc-005ba099e9
    Date: Tue, 18 Sep 2018 06:23:37 GMT
    
    curl -i -X PUT \
      https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/DLO/dlo-object/0003 \
      -H 'X-Auth-Token: $token' \
      --data-binary '3'
    
    HTTP/1.1 201 Created
    Last-Modified: Tue, 18 Sep 2018 06:24:04 GMT
    Content-Length: 0
    Etag: eccbc87e4b5ce2fe28308fd9f2a7baf3
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx016a1cb31a684589b2a1d-005ba09a03
    X-Openstack-Request-Id: tx016a1cb31a684589b2a1d-005ba09a03
    Date: Tue, 18 Sep 2018 06:24:03 GMT
    

    DLO 매니페스트 파일 업로드

    curl -i -X PUT \
      https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/DLO/dlo \
      -H 'X-Object-Manifest: DLO/dlo-object/' \
      -H 'X-Auth-Token: $token' \
      --data-binary ''
    
    HTTP/1.1 201 Created
    Last-Modified: Tue, 18 Sep 2018 06:32:30 GMT
    Content-Length: 0
    Etag: d41d8cd98f00b204e9800998ecf8427e
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx086882957a56457fb39f9-005ba09bfd
    X-Openstack-Request-Id: tx086882957a56457fb39f9-005ba09bfd
    Date: Tue, 18 Sep 2018 06:32:29 GMT
    

    DLO 다운로드

    업로드된 DLO 파일을 다운로드하려면 매니페스트 파일을 다운로드합니다.

    자세한 내용은 아래 예시를 참조합니다.

    curl -i -X GET \
      https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/DLO/dlo \
      -H 'X-Auth-Token: $token' \
      --data-binary ''
    
    HTTP/1.1 200 OK
    Content-Length: 3
    Etag: "8f481cede6d2ddc07cb36aa084d9a64d"
    Accept-Ranges: bytes
    Last-Modified: Tue, 18 Sep 2018 06:32:30 GMT
    X-Object-Manifest: DLO/dlo-object/
    X-Timestamp: 1537252349.91188
    Content-Type: application/x-www-form-urlencoded
    X-Trans-Id: txca733836612d46978fa6d-005ba09c2c
    X-Openstack-Request-Id: txca733836612d46978fa6d-005ba09c2c
    Date: Tue, 18 Sep 2018 06:33:16 GMT
    
    123
    

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.