--- title: "download" slug: "cli-archivestorage-download" updated: 2026-10-08T09:46:16Z published: 2026-10-08T09:46:16Z canonical: "cli.ncloud-docs.com/cli-archivestorage-download" --- > ## 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. # download Classic/VPC環境で利用できます。 コンテナ(バケット)のオブジェクトをダウンロードします。 ## 構文 `download`構文は次の通りです。 - アカウント(すべてのコンテナおよびオブジェクトのダウンロード) ``` swift download \ --all \ [--marker ] \ [--prefix ] \ [--remove-prefix] \ [--output-dir ] \ [--object-threads ] \ [--container-threads ] \ [--no-download] \ [--skip-identical] \ [--ignore-checksum] \ [--ignore-mtime] \ [--no-shuffle] \ [--header ] ``` - コンテナ(コンテナ内のすべてのオブジェクトをダウンロード) ``` swift download \ \ [--marker ] \ [--prefix ] \ [--remove-prefix] \ [--output-dir ] \ [--object-threads ] \ [--container-threads ] \ [--no-download] \ [--skip-identical] \ [--ignore-checksum] \ [--ignore-mtime] \ [--no-shuffle] \ [--header ] ``` - オブジェクト(単一または複数のオブジェクトのダウンロード) ``` swift download \ [ ...] \ [--output ] \ [--output-dir ] \ [--object-threads ] \ [--no-download] \ [--skip-identical] \ [--ignore-checksum] \ [--ignore-mtime] \ [--header ] ``` ## オプション `download`の実行時に指定できるオプションについて説明します。 ### 必須オプション `download`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `<container>` | String | Conditional | コンテナ名 - `--all`未入力の場合、必ず入力 | | `--all` | Boolean | Conditional | アカウント内のすべてのオブジェクトをダウンロード - `<container>`未入力の場合、必ず入力 | ### 任意オプション `download`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `<object>` | List | Optional | オブジェクト名 - スペースで区切って複数入力可能 - 未入力の場合、コンテナ内のすべてのオブジェクトをダウンロード | | `--prefix` | String | Optional | 指定した接頭辞で始まる項目のみダウンロード | | `--remove-prefix` | Boolean | Optional | 接頭辞を除いた名前で保存 - `--prefix`と併せて使用 | | `--marker` | String | Optional | コンテナまたはアカウントのダウンロードを開始する基準となる位置 | | `--output` | String | Optional | 単一ファイルのダウンロード時に保存するファイルのパス - `-`入力時、標準出力で渡す | | `--output-dir` | String | Optional | オブジェクトの保存先ディレクトリ - 未入力の場合、現在のディレクトリに保存 - オブジェクトを1つだけ指定した場合は使用不可(`--output`を使用) | | `--no-download` | Boolean | Optional | ダウンロードを行うが、ディスクには保存しない | | `--skip-identical` | Boolean | Optional | ローカルファイルとオブジェクトが同一の場合、ダウンロードしない | | `--ignore-checksum` | Boolean | Optional | ダウンロード時のチェックサム検証を無効化 | | `--ignore-mtime` | Boolean | Optional | `X-Object-Meta-Mtime`ヘッダを無視して新しい時間情報で保存 | | `--no-shuffle` | Boolean | Optional | オブジェクトストレージに並べられている順序でダウンロード - 未入力の場合、任意の順序でダウンロード | | `--object-threads` | Integer | Optional | オブジェクトのダウンロードに使用するスレッド数 - デフォルト: `10` | | `--container-threads` | Integer | Optional | コンテナのダウンロードに使用するスレッド数 - デフォルト: `10` | | `--header` | String | Optional | ダウンロードリクエストに使用するユーザー定義ヘッダ - `header:value`形式で入力 - 複数回入力可能 | ### 共通オプション `swift`コマンドで共通して使用するオプションについては、[Archive Storageのオプション](/docs/ja/guide-archivestorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 コマンドを実行すると、ダウンロードしたオブジェクト名と所要時間情報が表示されます。 ### コマンド 1つのオブジェクトをダウンロードするコマンドの例は次の通りです。 ``` swift download test-container-01 sample.txt ``` 接頭辞で絞り込んで保存先ディレクトリを指定し、同一のファイルはスキップするコマンドの例は次の通りです。 ``` swift download test-container-01 \ --prefix docs/ \ --output-dir ./download \ --skip-identical ``` アカウント内のすべてのオブジェクトを順番にダウンロードするコマンドの例は次の通りです。 ``` swift download \ --all \ --no-shuffle ``` ### 出力 1つのオブジェクトをダウンロードする出力の例は次の通りです。 ``` sample.txt [auth 0.000s, headers 0.109s, total 0.109s, 0.000 MB/s] ``` 接頭辞で絞り込んでダウンロードする出力の例は次の通りです。 ``` ./download/docs/report.txt [auth 0.000s, headers 0.071s, total 0.071s, 0.000 MB/s] ``` アカウント内のすべてのオブジェクトをダウンロードする出力の例は次の通りです。 ``` test-container-01/renamed.txt [auth 0.000s, headers 0.129s, total 0.129s, 0.000 MB/s] test-container-01/sample.txt [auth 0.000s, headers 0.132s, total 0.132s, 0.000 MB/s] test-container-01/large.bin [auth 0.000s, headers 0.236s, total 0.372s, 14.090 MB/s] ```