---
title: "Archive Storage"
slug: "guide-archivestorage"
tags: ["Archive Storage", "CLI"]
updated: 2026-04-23T08:57:22Z
published: 2026-04-23T08:59:05Z
canonical: "cli.ncloud-docs.com/guide-archivestorage"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive Storage

<p class="platform-info type-classic-vpc">Classic/VPC 환경에서 이용 가능합니다.</p>

OpenStack swift CLI와 호환되는 Archive Storage CLI의 초기 설정 방법부터 간단한 사용 방법 등을 확인합니다.

## 초기 설정 <a name="초기설정"></a>

Archive Storage CLI를 사용하기 위한 설치와 인증 방법을 설명합니다.

### 설치 <a name="설치"></a>

설치 명령어는 다음과 같습니다.
* Python 3.9 이하:
```
pip install python-keystoneclient==3.17.0
pip install python-swiftclient==3.6.0
```

* Python 3.10 이상:
```
pip install python-keystoneclient==5.1.0
pip install python-swiftclient==4.3.0
```

:::(Info) (참고)
관련 자료는 다음을 참고해 주십시오.
* 문서 : [https://docs.openstack.org/ocata/cli-reference/swift.html](https://docs.openstack.org/ocata/cli-reference/swift.html){target="_blank"}
:::

### 인증 <a name="인증"></a>

인증 정보를 설정하는 방법은 다음과 같습니다.

* 요청
    ```
    swift --os-auth-url https://kr.archive.ncloudstorage.com:5000/v3 --auth-version 3 \
          --os-username {access_key_id} --os-password {secret_key} \
          --os-user-domain-id {domain_id} --os-project-id {project_id} \
          auth
    ```
* 결과
    ```
    export OS_STORAGE_URL=https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
    export OS_AUTH_TOKEN={token}
    ```
    * 결과 값에 표시되어 있는 export 명령으로 OS_STORAGE_URL, OS_AUTH_TOKEN를 환경 변수로 선언하여 재인증없이 서비스 요청을 이용 가능
        ```
        export OS_STORAGE_URL=https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
        export OS_AUTH_TOKEN={token}

        swift list
        ```
    * 환경 변수로 사용하지 않고 --os-storage-url, --os-auth-token 옵션값을 입력해서 사용 가능
        ```
        swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
              --os-auth-token {token} \
              list
        ```
    * 서비스 URL과 토큰값을 저장해서 사용하지 않고 매 요청마다 인증하는 방식으로 사용 가능
        ```
        swift --os-auth-url https://kr.archive.ncloudstorage.com:5000/v3 --auth-version 3 \
              --os-username {access_key_id} --os-password {secret_key} \
              --os-user-domain-id {domain_id} --os-project-id {project_id} \
              list
        ```
        :::(Info) (참고)
        서비스 요청 전에 매번 인증 요청을 수행하기 때문에 권장하지 않습니다.
        :::

## 명령어 <a name="명령어"></a>

Archive Storage CLI를 설명합니다.

### 컨테이너 목록 조회 <a name="컨테이너목록조회"></a>

컨테이너 목록을 조회하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      list
```
:::(Info) (참고)
서브 계정의 경우, 컨테이너 목록으로 조회 명령어(swift list)를 사용할 수 없습니다.
:::
### 오브젝트 목록 조회 <a name="오브젝트목록조회"></a>

오브젝트 목록을 조회하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      list {container}
```

### 오브젝트 업로드 <a name="오브젝트업로드"></a>

오브젝트를 업로드하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      upload {container} --object-name {object} {local_file_path}
```

### 대용량 오브젝트 업로드 <a name="대용량오브젝트업로드"></a>

대용량 오브젝트를 업로드할 때는 세그먼트 컨테이너와 매니페스트 컨테이너를 각각 다르게 지정해야 합니다.
아래는 매니페스트 파일을 `container1` 에 업로드하고, 세그먼트 파일들을 `container2` 에 업로드하는 예시 명령어입니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      upload container1 --object-name {object} {local_file_path} --segment-size {size} --segment-container container2 [--use-slo]
```

만약 다운로드를 수행하려면, `container1` 에 업로드된 오브젝트를 다운로드하면 됩니다.

### 로컬 경로 전체 업로드 <a name="로컬경로전체업로드"></a>

recursive하게 로컬 경로 전체를 업로드하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      upload {container} {local_file_path}
```

### 오브젝트 삭제 <a name="오브젝트삭제"></a>

오브젝트를 1개 이상 입력하여 삭제하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      delete {container} {object} [...]
```

--prefix 옵션을 사용하여 지정한 prefix로 시작하는 오브젝트를 삭제하려면 다음과 같이 명령어를 실행해 주십시오.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      delete {container} --prefix {prefix}
```

### 컨테이너 삭제 <a name="컨테이너삭제"></a>

컨테이너의 모든 오브젝트를 삭제하고 마지막에 컨테이너를 삭제하는 명령어는 다음과 같습니다.

```
swift --os-storage-url https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id} \
      --os-auth-token {token} \
      delete {container}
```
