- Print
- DarkLight
File Update Command
- Print
- DarkLight
V4.0.2
This command updates file settings.
You can set legal holds only for buckets that are enabled with Object Lock: fileLockEnabled=true
.
If you do not provide the file-retention-mode
parameter, you must submit the retain-until
parameter, which is a future timestamp represented as an integer in milliseconds since the epoch.
If a file is already in governance mode, you must provide --bypass-governance
to disable retention or shorten its time period.
If a file is already in compliance mode, you cannot disable retention or shorten its time period.
In both cases, you can prolong the retention time period. You can also switch from governance to compliance.
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.b2 file update [-h] [--legal-hold {on,off}]
[--file-retention-mode {compliance,governance,none}]
[--retain-until TIMESTAMP] [--bypass-governance]
B2_URI
Required Capabilities
- readFiles
- writeFileLegalHolds
Required only if you are updating legal holds. - writeFileRetentions
Required only if you are updating retention. - bypassGovernance
Required only if you submit the–-bypass-governance
parameter.
Positional Arguments
- B2_URI
Points to a file, for example,b2://yourBucket/file.txt
orb2id://fileId
.
Named Arguments
- --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance, none - --retain-until
- --bypass-governance
Default: False
V4.0.1
This command updates file settings.
You can set legal holds only for buckets that are enabled with Object Lock: fileLockEnabled=true
.
If you do not provide the file-retention-mode
parameter, you must submit the retain-until
parameter, which is a future timestamp represented as an integer in milliseconds since the epoch.
If a file is already in governance mode, you must provide --bypass-governance
to disable retention or shorten its time period.
If a file is already in compliance mode, you cannot disable retention or shorten its time period.
In both cases, you can prolong the retention time period. You can also switch from governance to compliance.
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.b2 file update [-h] [--legal-hold {on,off}]
[--file-retention-mode {compliance,governance,none}]
[--retain-until TIMESTAMP] [--bypass-governance]
B2_URI
Required Capabilities
- readFiles
- writeFileLegalHolds
Required only if you are updating legal holds. - writeFileRetentions
Required only if you are updating retention. - bypassGovernance
Required only if you submit the–-bypass-governance
parameter.
Positional Arguments
- B2_URI
Points to a file, for example,b2://yourBucket/file.txt
orb2id://fileId
.
Named Arguments
- --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance, none - --retain-until
- --bypass-governance
Default: False
V4.0.0
This command updates file settings.
You can set legal holds only for buckets that are enabled with Object Lock: fileLockEnabled=true
.
If you do not provide the file-retention-mode
parameter, you must submit the retain-until
parameter, which is a future timestamp represented as an integer in milliseconds since the epoch.
If a file is already in governance mode, you must provide --bypass-governance
to disable retention or shorten its time period.
If a file is already in compliance mode, you cannot disable retention or shorten its time period.
In both cases, you can prolong the retention time period. You can also switch from governance to compliance.
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.b2 file update [-h] [--legal-hold {on,off}]
[--file-retention-mode {compliance,governance,none}]
[--retain-until TIMESTAMP] [--bypass-governance]
B2_URI
Required Capabilities
- readFiles
- writeFileLegalHolds
Required only if you are updating legal holds. - writeFileRetentions
Required only if you are updating retention. - bypassGovernance
Required only if you submit the–-bypass-governance
parameter.
Positional Arguments
- B2_URI
Points to a file, for example,b2://yourBucket/file.txt
orb2id://fileId
.
Named Arguments
- --legal-hold
Possible values: on, off - --file-retention-mode
Possible values: compliance, governance, none - --retain-until
- --bypass-governance
Default: False
This command is not included in version 2.1.0.
This command is not included in version 2.2.0.
This command is not included in version 2.3.0.
This command is not included in version 2.4.0.
This command is not included in version 2.5.0.
This command is not included in version 2.5.1.
This command is not included in version 3.0.0.
This command is not included in version 3.0.1.
This command is not included in version 3.0.2.
This command is not included in version 3.0.3.
This command is not included in version 3.1.0.
This command is not included in version 3.2.0.
This command is not included in version 3.2.1.
This command is not included in version 3.3.0.
This command is not included in version 3.4.0.
This command is not included in version 3.5.0.
This command is not included in version 3.6.0.
This command is not included in version 3.7.0.
This command is not included in version 3.7.1.
This command is not included in version 3.8.0.
This command is not included in version 3.9.0.
This command is not included in version 3.12.0.
This command is not included in version 3.13.0.
This command is not included in version 3.13.1.
This command is not included in version 3.14.0.
This command is not included in version 3.15.0.
This command is not included in version 3.16.0.
This command is not included in version 3.16.1.
This command is not included in version 3.17.0.
This command is not included in version 3.18.0.
This command is not included in version 3.19.0.
This command is not included in version 3.19.1.
Versions