Download-file-by-name command

Downloads the given file, and stores it in the given local file.

If the tqdm library is installed, progress bar is displayed on stderr. Without it, simple text progress is printed. Use --noProgress to disable progress reporting.

To access SSE-C encrypted files, please set --sourceServerSideEncryption=SSE-C. The default algorithm is set to AES256 which can by changed with --sourceServerSideEncryptionAlgorithm parameter. Using SSE-C requires providing B2_SOURCE_SSE_C_KEY_B64 environment variable, containing the base64 encoded encryption key.

Use –write-buffer-size to set the size (in bytes) of the buffer used to write files.

Use –skip-hash-verification to disable hash check on downloaded files.

Use –max-download-streams-per-file to set max num of streams for parallel downloader.

Requires capability:

  • readFiles

b2 download-file-by-name [-h] [--profile PROFILE] [--noProgress]
                         [--threads THREADS]
                         [--sourceServerSideEncryption {SSE-C}]
                         [--sourceServerSideEncryptionAlgorithm {AES256}]
                         [--write-buffer-size BYTES]
                         [--max-download-streams-per-file MAX_DOWNLOAD_STREAMS_PER_FILE]
                         bucketName b2FileName localFileName

Positional Arguments


Named Arguments


Default: False


Default: 10


Possible choices: SSE-C


Possible choices: AES256

Default: “AES256”


Default: False