crab tier
Manage storage tier assignments.
Synopsis
crab tier [OPTIONS] <COMMAND>Description
crab tier manages bucket lifecycle rules. plan produces a human summary or
explicit XML, JSON, or YAML output; --apply --dry-run remains read-only.
Lifecycle mutation requires a provider conditional-write guard and verified
read-back. The S3 lifecycle API has no conditional write, so the CLI fails
closed before an S3 mutation; GCS and Azure also fail closed until their safe
prefix-preserving adapters are wired. rollback rejects provider or policy
drift, restores the previous configuration, and deletes the lifecycle when
none existed before apply. The prior policy backup is stored in the
repository's shared .crab/tier/backups directory and synced before provider
mutation, including when the command starts in a subdirectory. Invalid Crab
configuration fails closed.
For conceptual background, see Storage Tiers.
Each subcommand exposes its own provider-specific options. Use
crab tier <command> --help for details.
Examples
crab tier plan
crab tier plan --help
crab tier rollback --helpplan generates lifecycle rules without applying them unless --apply is
present. Review XML, JSON, or YAML output first, then use --apply only for the
intended bucket configuration. --merge preserves existing non-Crab rules
instead of rejecting a conflict. Before applying, retain the backup needed by
rollback; rollback accepts that backup file as a positional path.
Lifecycle rules change future provider transitions rather than rewriting every object during the command. Verify the active provider configuration after application and keep the plan with the maintenance record.
Related commands
crab optimize xorbs: rewrite xorbs to a target size profile.crab du: inspect disk usage.