본문으로 건너뛰기

Object Storage Client Tool - swift-cli

swift-cli 설치 및 기본 사용 가이드

해당 메뉴얼은 Object Storage 지원 Tool 중 하나인 swift-cli설치방법기본 사용법에 대해 설명합니다.

패키지 설치 및 구성

필요 패키지 설치 및 다운로드

# Debian
apt-get install python-setuptools python-pip git./


git clone https://github.com/openstack/python-swiftclient.git

# RHEL
yum install epel-release
yum install python-pip git
git clone https://github.com/openstack/python-swiftclient.git

설치 프로그램 실행

cd python-swiftclient

pip install –r requirements.txt

python setup.py develop

설치 확인

swift-cli --verison

환경변수 지정

export ST_AUTH=http://kr.object.iwinv.kr/auth

export ST_USER=[UserID]:[Access Key ID]

export ST_KEY=[Secret Key ID]

* 환경변수를 지정하지 않은경우 swift 명령어 사용시 -A, -U, -K 옵션이 필요합니다.
ex) swift list -A http://kr.object.iwinv.kr/auth -U [UserID]:[Access Key ID] -K [Secret Key ID]

기본 사용법

* 앞서 환경변수를 지정한 경우 별도의 옵션없이 swift명령어 사용이 가능합니다.

사용량 조회

swift status

사용량 조회

리스트 확인

swift list

swift list [bucket]

리스트

리스트

업로드

swift upload

업로드

다운로드

swift download

다운로드

삭제

swift delete

삭제