file download
Download the given file-like object, and store 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 --no-progress to disable progress reporting (marginally improves performance in some cases).
Use --threads to manually adjust the number of threads used in the operation.
Otherwise, the number of threads will be automatically chosen.
To access SSE-C encrypted files,
please set --source-server-side-encryption=SSE-C.
The default algorithm is set to AES256 which can by changed
with --source-server-side-encryption-algorithm 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 file download [-h] [--threads THREADS]
[--max-download-streams-per-file MAX_DOWNLOAD_STREAMS_PER_FILE]
[--no-progress] [--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--write-buffer-size BYTES] [--skip-hash-verification]
B2_URI localFileName
Positional Arguments
- B2_URI
B2 URI pointing to a file, e.g. b2://yourBucket/file.txt or b2id://fileId
- localFileName
Named Arguments
- --threads
- --max-download-streams-per-file
- --no-progress
progress will not be reported
Default: False
- --source-server-side-encryption
Possible choices: SSE-C
- --source-server-side-encryption-algorithm
Possible choices: AES256
Default: “AES256”
- --write-buffer-size
- --skip-hash-verification
Default: False