- Print
- DarkLight
File Upload Command
- Print
- DarkLight
V4.0.2
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.The --content-type
parameter is optional. If you do not set this value, it is automatically determined.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB).
Each fileInfo
entry is of the form a=b
.
By default, the file is broken into many parts to maximize upload parallelism and increase speed. Setting --min-part-size
controls the minimal upload file part size. Part size must be between 5 MB and 5 GB. For more information, see Create Large Files with the Native API.
If the tqdm
library is installed, a progress bar is displayed on standard error (stderr). Without it, simple text progress is printed. Use --no-progress
to disable progress reporting. This can marginally improve performance.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
File retention settings require the writeFileRetentions
capability, and they work only in a bucket with fileLockEnabled
set to true
. If you provide --file-retention-mode
, you must also provide --retain-until
which must be a future timestamp in the form of an integer representing milliseconds since epoch. If you do not provide these options, the file is retained according to bucket defaults.
Legal hold settings require the writeFileLegalHolds
capability, and they work only in a bucket with fileLockEnabled
set to true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 file upload [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V4.0.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.The --content-type
parameter is optional. If you do not set this value, it is automatically determined.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB).
Each fileInfo
entry is of the form a=b
.
By default, the file is broken into many parts to maximize upload parallelism and increase speed. Setting --min-part-size
controls the minimal upload file part size. Part size must be between 5 MB and 5 GB. For more information, see Create Large Files with the Native API.
If the tqdm
library is installed, a progress bar is displayed on standard error (stderr). Without it, simple text progress is printed. Use --no-progress
to disable progress reporting. This can marginally improve performance.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
File retention settings require the writeFileRetentions
capability, and they work only in a bucket with fileLockEnabled
set to true
. If you provide --file-retention-mode
, you must also provide --retain-until
which must be a future timestamp in the form of an integer representing milliseconds since epoch. If you do not provide these options, the file is retained according to bucket defaults.
Legal hold settings require the writeFileLegalHolds
capability, and they work only in a bucket with fileLockEnabled
set to true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 file upload [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V4.0.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.The --content-type
parameter is optional. If you do not set this value, it is automatically determined.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB).
Each fileInfo
entry is of the form a=b
.
By default, the file is broken into many parts to maximize upload parallelism and increase speed. Setting --min-part-size
controls the minimal upload file part size. Part size must be between 5 MB and 5 GB. For more information, see Create Large Files with the Native API.
If the tqdm
library is installed, a progress bar is displayed on standard error (stderr). Without it, simple text progress is printed. Use --no-progress
to disable progress reporting. This can marginally improve performance.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
File retention settings require the writeFileRetentions
capability, and they work only in a bucket with fileLockEnabled
set to true
. If you provide --file-retention-mode
, you must also provide --retain-until
which must be a future timestamp in the form of an integer representing milliseconds since epoch. If you do not provide these options, the file is retained according to bucket defaults.
Legal hold settings require the writeFileLegalHolds
capability, and they work only in a bucket with fileLockEnabled
set to true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 file upload [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V3.19.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --content-type
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-min-part-size
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-no-progress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --file-retention-mode
parameter, you must provide a value for --retain-until
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V3.19.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --content-type
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-min-part-size
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-no-progress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --file-retention-mode
parameter, you must provide a value for --retain-until
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V3.18.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --content-type
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-min-part-size
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-no-progress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destination-server-side-encryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destination-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --file-retention-mode
parameter, you must provide a value for --retain-until
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incremental-mode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--content-type CONTENT_TYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--min-part-size MIN_PART_SIZE] [--threads THREADS]
[--no-progress]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--legal-hold {on,off}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--incremental-mode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --content-type
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --min-part-size
Minimum part size in bytes. - --threads
- --no-progress
Progress will not be reported.
Default: False - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --incremental-mode
Default: False
V3.17.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.16.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.16.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.15.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.14.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
Use --threads
to manually adjust the number of threads that are used in the operation. Otherwise, the number of threads is automatically chosen. The maximum number of upload threads to use to upload parts of a large file is specified by --threads
. It has no effect on “small” files (currently under 200MB). The default value is 10.
Each fileInfo is of the form a=b
.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded. Part size must be between 5MB and 5GB. For more information, see Create Large Files with the Native API.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --cache-control
Optional Cache-Control header. The value is based on RFC 2616 section 14.9, for example,‘public, max-age=86400’)
. - --content-disposition
Optional Content-Disposition header. The value is based on RFC 2616 section 19.5.1, for example,‘attachment; filename=”fname.ext”’
. - --content-encoding
Optional Content-Encoding header. The value is based on RFC 2616 section 14.11, for example,‘gzip’
. - --content-language
Optional Content-Language header. The value is based on RFC 2616 section 14.12, for example,‘mi, en’
. - --expires
Optional Expires header. The value is based on RFC 2616 section 14.21, for example,‘Thu, 01 Dec 2050 16:00:00 GMT’
. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.13.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1]
[--cache-control CACHE_CONTROL] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --cache-control
- --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.13.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1]
[--cache-control CACHE_CONTROL] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --cache-control
- --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.12.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
You can provide a first-in-first-out (FIFO) file (such as named pipe) instead of a regular file.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--contentType CONTENTTYPE] [--sha1 SHA1]
[--cache-control CACHE_CONTROL] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--minPartSize MINPARTSIZE] [--threads THREADS] [--noProgress]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --contentType
MIME type of the file being uploaded. If you do not set this value, it is guessed. - --sha1
SHA-1 of the data being uploaded. This is used to verify file integrity. - --cache-control
- --info
Additional file information to be stored with the file. You can use this option multiple times for different information.
Default: [] - --custom-upload-timestamp
Overrides the object creation date. It is expressed as a number of milliseconds since epoch. - --minPartSize
Minimum part size in bytes. - --threads
- --noProgress
Progress will not be reported.
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.9.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
You can use the --custom-upload-timestamp
parameter, in milliseconds-since-epoch, to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. Access to this feature is restricted. Contact the Support team to temporarily enable it for your account.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--custom-upload-timestamp CUSTOM_UPLOAD_TIMESTAMP]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --custom-upload-timestamp
- --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.8.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.7.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.7.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
Use the --incrementalMode
parameter to allow for incremental file uploads to a safe bandwidth. This affects only the files that have been appended since the last upload.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--incrementalMode]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --incrementalMode
Default: False
V3.6.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.5.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.4.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.3.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--profile PROFILE] [--noProgress] [--quiet]
[--contentType CONTENTTYPE] [--minPartSize MINPARTSIZE]
[--sha1 SHA1] [--threads THREADS] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --profile
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.2.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.2.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.1.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.0.3
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.0.2
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.0.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V3.0.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V2.5.1
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V2.5.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
To set file retention settings, use the writeFileRetentions
capability on buckets with fileLockEnabled
=true
. To use the --fileRetentionMode
parameter, you must provide a value for --retainUntil
as a future timestamp, in the form of an integer representing milliseconds since epoch. Leaving out these options results in a file retained according to bucket defaults.
To set legal holds, use the writeFileLegalHolds
capability on buckets with fileLockEnabled
=true
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--legalHold {on,off}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --legalHold
Possible values: on, off - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
V2.4.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 or SSE-C encryption for destination files, set the --destinationServerSideEncryption=SSE-B2/SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_DESTINATION_SSE_C_KEY_B64
environment variable that contains the base64-encoded encryption key. If you provide the B2_DESTINATION_SSE_C_KEY_ID
environment variable, its value is saved as sse_c_key_id
in the uploaded file’s fileInfo
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.3.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
To request SSE-B2 encryption for destination files, set the --destinationServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --destinationServerSideEncryptionAlgorithm
parameter.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO] [--destinationServerSideEncryption {SSE-B2}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: [] - --destinationServerSideEncryption
Possible value: SSE-B2 - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.2.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: []
V2.1.0
This command uploads a single file to the given bucket. It also uploads the contents of the local file and assigns the given name to the Backblaze B2 Cloud Storage file, possibly setting options like server-side encryption and retention.
By default, this command computes the sha1 checksum of the file to be uploaded. However, if you already have the checksum of the file, you can provide it on the command-line to save a little time.
The --contentType
parameter is optional. If you do not set this value, it is automatically determined based on the file extension.
By default, the file is broken into as many parts as possible to maximize upload parallelism and increase speed. The minimum size allowed is 100MB. Setting –-minPartSize
to a larger value reduces the number of large file parts that are uploaded.
The maximum number of threads to use to upload parts of a large file is specified by the -–threads
parameter. It has no effect on small files (under 200MB). The default value is 10.
If the ‘tqdm’ library is installed, a progress bar is displayed in the standard error output. Without it, the simple text progress is printed. Use the –-noProgress
parameter to disable progress reporting.
Each fileInfo is of the form a=b
.
b2 upload-file [-h] [--noProgress] [--quiet] [--contentType CONTENTTYPE]
[--minPartSize MINPARTSIZE] [--sha1 SHA1] [--threads THREADS]
[--info INFO]
bucketName localFilePath b2FileName
Required Capabilities
- writeFiles
Positional Arguments
- bucketName
Name of the bucket where the file is stored. - localFilePath
Path of the local file or stream to be uploaded. - b2FileName
The name of the file when stored in Backblaze B2.
Named Arguments
- --noProgress
Default: False - --quiet
Default: False - --contentType
- --minPartSize
- --sha1
- --threads
Default: 10 - --info
Default: []
Versions