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.

Requires capability:

  • readFiles

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

Positional Arguments

bucketName
b2FileName
localFileName

Named Arguments

--profile
--noProgress

Default: False

--threads

Default: 10

--sourceServerSideEncryption

Possible choices: SSE-C

--sourceServerSideEncryptionAlgorithm

Possible choices: AES256

Default: “AES256”

--write-buffer-size
--skip-hash-verification

Default: False