- Print
- DarkLight
File Copy by ID Command
- Print
- DarkLight
V4.0.2
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive) range of bytes from the source file to the new file using the --range
option.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 file copy-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
- --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V4.0.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive) range of bytes from the source file to the new file using the --range
option.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 file copy-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
- --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V4.0.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive) range of bytes from the source file to the new file using the --range
option.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 file copy-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
- --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V3.19.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
Default: [] - --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V3.19.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
Default: [] - --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V3.18.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --content-type
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --no-info
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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
.
To access SSE-C-encrypted files, set the --source-server-side-encryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --ource-server-side-encryption-algorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --file-retention-mode
parameter, you must provide the --retain-until
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --content-type
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetch-metadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetch-metadata] [--content-type CONTENT_TYPE]
[--range RANGE] [--info INFO | --no-info]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destination-server-side-encryption {SSE-B2,SSE-C}]
[--destination-server-side-encryption-algorithm {AES256}]
[--source-server-side-encryption {SSE-C}]
[--source-server-side-encryption-algorithm {AES256}]
[--file-retention-mode {compliance,governance}]
[--retain-until TIMESTAMP] [--legal-hold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetch-metadata
Default: False - --content-type
- --range
- --info
Default: [] - --no-info
Default: False - --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’
). - --destination-server-side-encryption
Possible values: SSE-B2, SSE-C - --destination-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --source-server-side-encryption
Possible value: SSE-C - --source-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --file-retention-mode
Possible values: compliance, governance - --retain-until
- --legal-hold
Possible values: on, off
V3.17.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --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’
). - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.16.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --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’
). - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.16.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --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’
). - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.15.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --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’
). - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.14.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--cache-control CACHE_CONTROL]
[--content-disposition CONTENT_DISPOSITION]
[--content-encoding CONTENT_ENCODING]
[--content-language CONTENT_LANGUAGE] [--expires EXPIRES]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --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’
). - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.13.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.13.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.12.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.9.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.8.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.7.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.7.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.6.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.5.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.4.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.3.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--profile PROFILE] [--fetchMetadata]
[--contentType CONTENTTYPE] [--range RANGE]
[--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --profile
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.2.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.2.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.1.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.0.3
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.0.2
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.0.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V3.0.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type; therefore, --contentType
and --info
are optional. If you set one of the parameters, then you must also set the other one.
To force the destination file to have an empty fileInfo, use the parameter --noInfo
.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
If either the source or the destination use SSE-C and --contentType
and --info
are not provided, then the source file’s metadata must be fetched first. Provide an additional request to Backblaze B2 cloud by providing the --fetchMetadata
parameter or the command fails.
b2 copy-file-by-id [-h] [--fetchMetadata] [--contentType CONTENTTYPE]
[--range RANGE] [--info INFO | --noInfo]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --fetchMetadata
Default: False - --contentType
- --range
- --info
Default: [] - --noInfo
Default: False - --destinationServerSideEncryption
Possible values: SSE-B2, SSE-C - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V2.5.1
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
b2 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2 - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileEetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V2.5.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file, possibly setting options like server-side encryption and retention.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
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 values, use the writeFileRetentions
capability. This option works only in a bucket with fileLockEnabled
=true
. If you provide the --fileRetentionMode
parameter, you must provide the --retainUntil
parameter which is 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, and it works only in a bucket with fileLockEnabled
=true
.
b2 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
[--fileRetentionMode {compliance,governance}]
[--retainUntil TIMESTAMP] [--legalHold {on,off}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2 - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --fileRetentionMode
Possible values: compliance, governance - --retainUntil
- --legalHold
Possible values: on, off
V2.4.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 access SSE-C-encrypted files, set the --sourceServerSideEncryption=SSE-C
parameter. The default algorithm is set to AES256 which you can change with the --sourceServerSideEncryptionAlgorithm
parameter. Using SSE-C requires that you provide the B2_SOURCE_SSE_C_KEY_B64
environment variable, containing the base64-encoded encryption key.
b2 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
[--destinationServerSideEncryption {SSE-B2,SSE-C}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
[--sourceServerSideEncryption {SSE-C}]
[--sourceServerSideEncryptionAlgorithm {AES256}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2 - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --sourceServerSideEncryption
Possible value: SSE-C - --sourceServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.3.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
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 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
[--destinationServerSideEncryption {SSE-B2}]
[--destinationServerSideEncryptionAlgorithm {AES256}]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: [] - --destinationServerSideEncryption
Possible values: SSE-B2 - --destinationServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.2.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
b2 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: []
V2.1.0
This command copies a file version to the given bucket (server-side, not using download+upload). It copies the contents of the source Backblaze B2 Cloud Storage file to a destination bucket and assigns the given name to the new Backblaze B2 file.
By default, this command copies the file information and content type. You can replace these values by setting the --metadataDirective
parameter to replace
.
You should provide the --contentType
and the --info
parameters only if the --metadataDirective
parameter is set to replace
. Do not provide --contentType
if the --metadataDirective
parameter is set to copy
.
The --contentType
and the --info
parameters are optional. If not set, they are set based on the source file.
By default, the whole file is copied, but you can copy an (inclusive!) range of bytes from the source file to the new file using the --range
parameter.
Each --info
entry is in the form a=b
, and you can specify many entries.
The maximum file size is 5 GB or 10 TB, depending on the capability of the installed b2sdk
version.
b2 copy-file-by-id [-h] [--metadataDirective {copy,replace}]
[--contentType CONTENTTYPE] [--range RANGE] [--info INFO]
sourceFileId destinationBucketName b2FileName
Required Capabilities
- readFiles
Required only if thesourceFileId
bucket is private. - writeFiles
Positional Arguments
- sourceFileId
- destinationBucketName
- b2FileName
Named Arguments
- --metadataDirective
Possible values: copy, replace - --contentType
- --range
- --info
Default: []
Versions