2017-02-15 8 views
0

私はオブジェクトストレージコンテナに大きなファイルセットを持っていましたので、それらをダウンロードしようとしました。私はすべてのセットアップが必要でした迅速CLIのとthat.Iを使用してbluemixswift cliを使用してbluemixのオブジェクトストレージコンテナからファイルをダウンロードすることができません

"auth_url": "https://identity.open.softlayer.com", 
"endpoint_url": "https://objectstorage.open.softlayer.com/v1/AUTH_", 
"password": "********", 
    "projectId": "**************", 
"userId": "**********", 
"v3_auth_url":"https://identity.open.softlayer.com/v3/auth/tokens" 

から、これらすべてのオブジェクトストレージの詳細を持っている。しかし、私は、このコマンドを使用すると、私は、オブジェクトを得た上で、データに

を使用してダウンロードしようとしていた時に迅速なコマンドが機能していませんストレージURLと応答としてのauth_token

swift auth --os-auth-url https://identity.open.softlayer.com/v3 --auth-version 3 --os-project 
-id ***** --os-user-id ****** --os-password ******* 

その後、私はまた、私はコンテナからすべてのファイルをダウンロードするには、このコマンドを使用しますがdidntのは

swift download --all containername --os-auth-url https://identity.open.softlayer.com/v3 --au 
th-version 3 --os-project-id ****** --os-user-id ******* --os-password ****** 

をしてください働いていたコンテナのリストを取得するにはobjectstorage URLとauth_tokenを使用しますが、空の応答に

swift --os-auth-token ***** --os-storage-url ******* list 

を得ていましたこれに関する知識を持つ人がこれらのファイルをダウンロードするのに役立ちます ありがとう

答えて

2

私は適切な環境t変数はSwift CLIを使いやすくします。これらを定義することから始めてください。

export OS_USER_ID='xxxxxxxx' #userId field in Bluemix UI 
export OS_PASSWORD='xxxxxxxxx' # password field in Bluemix UI 
export OS_TENANT_ID='xxxxxxxxx' # projectId field in Bluemix data 
export OS_AUTH_URL='https://identity.open.softlayer.com/v3' 
export OS_REGION_NAME='dallas' #region (change as needed) 
export OS_IDENTITY_API_VERSION=3 
export OS_AUTH_VERSION=3 

次に、--optionsをあまり使わないでswiftコマンドラインを使用できます。 「果物」コンテナの内容リスト:

$: swift list fruit 
apple 
banana 
orange 

ダウンロードを「果物」のコンテナ内のすべてのオブジェクトは:

$: swift download fruit 
banana [auth 0.455s, headers 0.919s, total 0.920s, 0.000 MB/s] 
apple [auth 0.444s, headers 0.932s, total 0.933s, 0.000 MB/s] 
orange [auth 0.498s, headers 1.104s, total 1.104s, 0.000 MB/s] 

--allオプションは、(すべてのコンテナとオブジェクトをすべてをダウンロードするために使用することができます)。単一のコンテナのダウンロードには使用されません。

$: swift download --all 
usercontainer/budgets.ods [auth 0.426s, headers 1.139s, total 1.140s, 0.033 MB/s] 
usercontainer/get-pip.py [auth 0.440s, headers 1.109s, total 1.402s, 1.657 MB/s] 
usercontainer/profile.jpg [auth 0.418s, headers 1.123s, total 5.240s, 0.415 MB/s] 
fruit/orange [auth 0.000s, headers 0.064s, total 0.064s, 0.000 MB/s] 
fruit/banana [auth 0.000s, headers 0.070s, total 0.070s, 0.000 MB/s] 
fruit/apple [auth 0.000s, headers 0.077s, total 0.077s, 0.000 MB/s] 
+0

私は、Windows上にある場合は、環境変数を設定するには、SETの代わりに、輸出を使用する必要が –

+1

を認識していないとして、それが私を与えているexportコマンドを使用しようとします。 – mpcarl

+0

はい私はセットを使用した後、すぐにダウンロードの名前を与えましたが、それは私にauthenticationfailureを与えました –

関連する問題