tigris-buckets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Tigris Bucket Management

Tigris存储桶管理

Quick Reference

快速参考

CommandDescription
tigris mk <name>
Create a bucket (or folder with trailing
/
)
tigris buckets list
List all buckets
tigris buckets get <name>
Inspect bucket details
tigris buckets delete <name>
Delete a bucket
tigris buckets set <name>
Update bucket settings
tigris buckets set-ttl <name>
Configure object expiration
tigris buckets set-locations <name>
Set data locations
tigris buckets set-migration <name>
Configure shadow bucket migration
tigris buckets set-transition <name>
Configure storage class transitions
tigris buckets set-notifications <name>
Configure event webhooks
tigris buckets set-cors <name>
Configure CORS rules
tigris snapshots list <bucket>
List bucket snapshots
tigris snapshots take <bucket>
Take a snapshot
命令描述
tigris mk <name>
创建存储桶(或末尾带
/
的文件夹)
tigris buckets list
列出所有存储桶
tigris buckets get <name>
查看存储桶详细信息
tigris buckets delete <name>
删除存储桶
tigris buckets set <name>
更新存储桶设置
tigris buckets set-ttl <name>
配置对象过期时间
tigris buckets set-locations <name>
设置数据存储位置
tigris buckets set-migration <name>
配置影子存储桶数据迁移
tigris buckets set-transition <name>
配置存储层级转换规则
tigris buckets set-notifications <name>
配置事件Webhook通知
tigris buckets set-cors <name>
配置CORS规则
tigris snapshots list <bucket>
列出存储桶快照
tigris snapshots take <bucket>
创建存储桶快照

Create a Bucket

创建存储桶

tigris mk <path>
(alias:
create
)

tigris mk <path>
(别名:
create

Create a bucket (bare name) or a folder inside a bucket (trailing
/
). Supports
t3://
and
tigris://
URI prefixes.
bash
tigris mk my-bucket
tigris mk my-bucket --access public --locations iad
tigris mk my-bucket/images/                              # creates a folder
tigris mk t3://my-bucket
tigris mk my-fork --fork-of my-bucket
tigris mk my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
创建存储桶(纯名称)或存储桶内的文件夹(末尾带
/
)。支持
t3://
tigris://
URI前缀。
bash
tigris mk my-bucket
tigris mk my-bucket --access public --locations iad
tigris mk my-bucket/images/                              # 创建文件夹
tigris mk t3://my-bucket
tigris mk my-fork --fork-of my-bucket
tigris mk my-fork --fork-of my-bucket --source-snapshot 1765889000501544464

tigris buckets create <name>
(alias:
c
)

tigris buckets create <name>
(别名:
c

Same as
mk
but under the
buckets
subcommand.
bash
tigris buckets create my-bucket
tigris buckets create my-bucket --access public --locations iad
tigris buckets create my-bucket --enable-snapshots --default-tier STANDARD_IA
tigris buckets create my-fork --fork-of my-bucket
tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
Flags:
FlagAliasDescriptionDefault
--access
-a
Access level (
public
,
private
)
private
--public
Shorthand for
--access public
--locations
-l
Bucket location (see Locations)
global
--default-tier
-t
Default storage tier (see Storage Tiers)
STANDARD
--enable-snapshots
-s
Enable snapshots for the bucket
false
--fork-of
--fork
Create as a fork (copy-on-write clone) of the named source bucket
--source-snapshot
--source-snap
Fork from a specific snapshot (requires
--fork-of
)
--format
-f
Output format (
json
,
table
)
table
--json
Output as JSON
--consistency
-c
(Deprecated) Use
--locations
instead
--region
-r
(Deprecated) Use
--locations
instead
功能与
mk
相同,属于
buckets
子命令下的操作。
bash
tigris buckets create my-bucket
tigris buckets create my-bucket --access public --locations iad
tigris buckets create my-bucket --enable-snapshots --default-tier STANDARD_IA
tigris buckets create my-fork --fork-of my-bucket
tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
参数选项:
参数选项别名描述默认值
--access
-a
访问级别(
public
private
private
--public
--access public
的简写形式
--locations
-l
存储桶位置(详见存储位置
global
--default-tier
-t
默认存储层级(详见存储层级
STANDARD
--enable-snapshots
-s
为存储桶启用快照功能
false
--fork-of
--fork
创建为指定源存储桶的分支(写时复制克隆)
--source-snapshot
--source-snap
从指定快照创建分支(需配合
--fork-of
使用)
--format
-f
输出格式(
json
table
table
--json
以JSON格式输出
--consistency
-c
(已废弃) 请使用
--locations
替代
--region
-r
(已废弃) 请使用
--locations
替代

List Buckets

列出存储桶

tigris buckets list
(alias:
l
)

tigris buckets list
(别名:
l

List all buckets in the current organization.
bash
tigris buckets list
tigris buckets list --json
tigris buckets list --forks-of my-bucket
FlagDescription
--forks-of
Only list buckets that are forks of the named source bucket
--format
/
-f
Output format (
json
,
table
,
xml
; default:
table
)
--json
Output as JSON
列出当前组织下的所有存储桶。
bash
tigris buckets list
tigris buckets list --json
tigris buckets list --forks-of my-bucket
参数选项描述
--forks-of
仅列出指定源存储桶的所有分支存储桶
--format
/
-f
输出格式(
json
table
xml
;默认:
table
--json
以JSON格式输出

Inspect a Bucket

查看存储桶详情

tigris buckets get <name>
(alias:
g
)

tigris buckets get <name>
(别名:
g

Show details for a bucket including access level, region, tier, and custom domain.
bash
tigris buckets get my-bucket
tigris buckets get my-bucket --json
FlagDescription
--format
/
-f
Output format (
json
,
table
,
xml
; default:
table
)
--json
Output as JSON
显示存储桶的详细信息,包括访问级别、区域、存储层级和自定义域名。
bash
tigris buckets get my-bucket
tigris buckets get my-bucket --json
参数选项描述
--format
/
-f
输出格式(
json
table
xml
;默认:
table
--json
以JSON格式输出

Delete a Bucket

删除存储桶

tigris buckets delete <name>
(alias:
d
)

tigris buckets delete <name>
(别名:
d

Delete one or more buckets by name. Accepts comma-separated names.
bash
tigris buckets delete my-bucket --force
tigris buckets delete bucket-a,bucket-b --force
FlagDescription
--force
Skip confirmation prompt
--format
/
-f
Output format (
json
,
table
; default:
table
)
--json
Output as JSON
按名称删除一个或多个存储桶,支持逗号分隔的多个名称。
bash
tigris buckets delete my-bucket --force
tigris buckets delete bucket-a,bucket-b --force
参数选项描述
--force
跳过确认提示
--format
/
-f
输出格式(
json
table
;默认:
table
--json
以JSON格式输出

Update Bucket Settings

更新存储桶设置

tigris buckets set <name>
(alias:
s
)

tigris buckets set <name>
(别名:
s

Update settings on an existing bucket.
bash
tigris buckets set my-bucket --access public
tigris buckets set my-bucket --locations iad,fra --cache-control 'max-age=3600'
tigris buckets set my-bucket --custom-domain assets.example.com
FlagDescription
--access
Bucket access level (
public
,
private
)
--locations
Bucket locations (see Locations)
--enable-delete-protection
Enable delete protection (
true
/
false
)
--cache-control
Default cache-control header value
--custom-domain
Custom domain for the bucket
--allow-object-acl
Enable object-level ACL (
true
/
false
)
--disable-directory-listing
Disable directory listing (
true
/
false
)
--enable-additional-headers
Enable additional HTTP headers like
X-Content-Type-Options: nosniff
(
true
/
false
)
--region
(Deprecated) Use
--locations
instead
--format
Output format (
json
,
table
; default:
table
)
--json
Output as JSON
更新现有存储桶的设置。
bash
tigris buckets set my-bucket --access public
tigris buckets set my-bucket --locations iad,fra --cache-control 'max-age=3600'
tigris buckets set my-bucket --custom-domain assets.example.com
参数选项描述
--access
存储桶访问级别(
public
private
--locations
存储桶位置(详见存储位置
--enable-delete-protection
启用删除保护(
true
/
false
--cache-control
默认缓存控制头值
--custom-domain
存储桶的自定义域名
--allow-object-acl
启用对象级ACL权限控制(
true
/
false
--disable-directory-listing
禁用目录列表(
true
/
false
--enable-additional-headers
启用额外HTTP头,如
X-Content-Type-Options: nosniff
true
/
false
--region
(已废弃) 请使用
--locations
替代
--format
输出格式(
json
table
;默认:
table
--json
以JSON格式输出

Bucket Configuration Commands

存储桶配置命令

tigris buckets set-ttl <name>

tigris buckets set-ttl <name>

Configure object expiration (TTL) on a bucket.
bash
tigris buckets set-ttl my-bucket --days 30
tigris buckets set-ttl my-bucket --date 2026-06-01
tigris buckets set-ttl my-bucket --disable
FlagAliasDescription
--days
-d
Expire objects after this many days
--date
Expire objects on this date (ISO-8601, e.g.
2026-06-01
)
--enable
Enable TTL (uses existing lifecycle rules)
--disable
Disable TTL on the bucket
配置存储桶的对象过期时间(TTL)。
bash
tigris buckets set-ttl my-bucket --days 30
tigris buckets set-ttl my-bucket --date 2026-06-01
tigris buckets set-ttl my-bucket --disable
参数选项别名描述
--days
-d
对象在指定天数后过期
--date
对象在指定日期过期(ISO-8601格式,例如
2026-06-01
--enable
启用TTL(使用现有生命周期规则)
--disable
禁用存储桶的TTL功能

tigris buckets set-locations <name>

tigris buckets set-locations <name>

Set the data locations for a bucket.
bash
tigris buckets set-locations my-bucket --locations iad
tigris buckets set-locations my-bucket --locations iad,fra
tigris buckets set-locations my-bucket --locations global
FlagAliasDescription
--locations
-l
Bucket location(s) — comma-separated (see Locations)
设置存储桶的数据存储位置。
bash
tigris buckets set-locations my-bucket --locations iad
tigris buckets set-locations my-bucket --locations iad,fra
tigris buckets set-locations my-bucket --locations global
参数选项别名描述
--locations
-l
存储桶位置(逗号分隔,详见存储位置

tigris buckets set-migration <name>

tigris buckets set-migration <name>

Configure data migration from an external S3-compatible source bucket. Tigris pulls objects on demand from the source (shadow bucket pattern).
bash
tigris buckets set-migration my-bucket \
  --bucket source-bucket \
  --endpoint https://s3.amazonaws.com \
  --region us-east-1 \
  --access-key AKIA... \
  --secret-key wJal...
配置从外部兼容S3的源存储桶进行数据迁移。Tigris会按需从源存储桶拉取对象(影子存储桶模式)。
bash
tigris buckets set-migration my-bucket \
  --bucket source-bucket \
  --endpoint https://s3.amazonaws.com \
  --region us-east-1 \
  --access-key AKIA... \
  --secret-key wJal...

Enable write-through (writes go to both source and Tigris)

启用写通模式(写入操作同时同步到源存储桶和Tigris)

tigris buckets set-migration my-bucket
--bucket source-bucket
--endpoint https://s3.amazonaws.com
--region us-east-1
--access-key AKIA...
--secret-key wJal...
--write-through
tigris buckets set-migration my-bucket
--bucket source-bucket
--endpoint https://s3.amazonaws.com
--region us-east-1
--access-key AKIA...
--secret-key wJal...
--write-through

Disable migration

禁用迁移

tigris buckets set-migration my-bucket --disable

**Migration workflow:** Point Tigris at your existing S3-compatible bucket. Tigris serves objects on demand — when a request hits Tigris and the object isn't cached yet, it fetches from the source. Over time, all accessed objects are pulled into Tigris. Use `--write-through` to also push new writes back to the source during migration.

| Flag              | Alias      | Description                                        |
| ----------------- | ---------- | -------------------------------------------------- |
| `--bucket`        | `-b`       | Name of the source bucket to migrate from          |
| `--endpoint`      | `-e`       | Endpoint URL of the source S3-compatible service   |
| `--region`        | `-r`       | Region of the source bucket                        |
| `--access-key`    | `--key`    | Access key for the source bucket                   |
| `--secret-key`    | `--secret` | Secret key for the source bucket                   |
| `--write-through` |            | Enable write-through mode                          |
| `--disable`       |            | Disable migration and clear all migration settings |
tigris buckets set-migration my-bucket --disable

**迁移流程:** 将Tigris指向您现有的兼容S3的存储桶。Tigris会按需提供对象——当请求到达Tigris且对象尚未缓存时,它会从源存储桶获取对象。随着时间推移,所有被访问的对象都会被拉取到Tigris中。使用`--write-through`可以在迁移期间将新写入的内容同步回源存储桶。

| 参数选项              | 别名      | 描述                                        |
| ----------------- | ---------- | ------------------------------------------- |
| `--bucket`        | `-b`       | 要迁移的源存储桶名称                        |
| `--endpoint`      | `-e`       | 源兼容S3服务的端点URL                       |
| `--region`        | `-r`       | 源存储桶的区域                              |
| `--access-key`    | `--key`    | 源存储桶的访问密钥                          |
| `--secret-key`    | `--secret` | 源存储桶的密钥                              |
| `--write-through` |            | 启用写通模式                                |
| `--disable`       |            | 禁用迁移并清除所有迁移设置                  |

tigris buckets set-transition <name>

tigris buckets set-transition <name>

Configure a lifecycle transition rule. Automatically move objects to a different storage class after a number of days or on a specific date.
bash
tigris buckets set-transition my-bucket --storage-class STANDARD_IA --days 30
tigris buckets set-transition my-bucket --storage-class GLACIER --date 2026-06-01
tigris buckets set-transition my-bucket --enable
tigris buckets set-transition my-bucket --disable
FlagAliasDescription
--storage-class
-s
Target storage class (
STANDARD_IA
,
GLACIER
,
GLACIER_IR
)
--days
-d
Transition objects after this many days
--date
Transition objects on this date (ISO-8601)
--enable
Enable lifecycle transition rules
--disable
Disable lifecycle transition rules
配置生命周期转换规则。在指定天数后或特定日期自动将对象移动到不同的存储层级。
bash
tigris buckets set-transition my-bucket --storage-class STANDARD_IA --days 30
tigris buckets set-transition my-bucket --storage-class GLACIER --date 2026-06-01
tigris buckets set-transition my-bucket --enable
tigris buckets set-transition my-bucket --disable
参数选项别名描述
--storage-class
-s
目标存储层级(
STANDARD_IA
GLACIER
GLACIER_IR
--days
-d
对象在指定天数后转换存储层级
--date
对象在指定日期转换存储层级(ISO-8601格式)
--enable
启用生命周期转换规则
--disable
禁用生命周期转换规则

tigris buckets set-notifications <name>

tigris buckets set-notifications <name>

Configure object event notifications. Sends webhook requests to a URL when objects are created, updated, or deleted.
bash
tigris buckets set-notifications my-bucket --url https://example.com/webhook
tigris buckets set-notifications my-bucket --url https://example.com/webhook --token secret123
tigris buckets set-notifications my-bucket --url https://example.com/webhook --username admin --password secret
tigris buckets set-notifications my-bucket --url https://example.com/webhook --filter 'WHERE `key` REGEXP "^images"'
tigris buckets set-notifications my-bucket --enable
tigris buckets set-notifications my-bucket --disable
tigris buckets set-notifications my-bucket --reset
FlagAliasDescription
--url
-u
Webhook URL (must be
http
or
https
)
--filter
-f
SQL WHERE clause to filter events by key
--token
-t
Token for webhook authentication
--username
Username for basic webhook authentication
--password
Password for basic webhook authentication
--enable
Enable notifications (uses existing config)
--disable
Disable notifications (preserves existing config)
--reset
Clear all notification settings
配置对象事件通知。当对象被创建、更新或删除时,向指定URL发送Webhook请求。
bash
tigris buckets set-notifications my-bucket --url https://example.com/webhook
tigris buckets set-notifications my-bucket --url https://example.com/webhook --token secret123
tigris buckets set-notifications my-bucket --url https://example.com/webhook --username admin --password secret
tigris buckets set-notifications my-bucket --url https://example.com/webhook --filter 'WHERE `key` REGEXP "^images"'
tigris buckets set-notifications my-bucket --enable
tigris buckets set-notifications my-bucket --disable
tigris buckets set-notifications my-bucket --reset
参数选项别名描述
--url
-u
Webhook URL(必须为
http
https
--filter
-f
用于按对象键过滤事件的SQL WHERE子句
--token
-t
Webhook认证令牌
--username
Webhook基础认证的用户名
--password
Webhook基础认证的密码
--enable
启用通知功能(使用现有配置)
--disable
禁用通知功能(保留现有配置)
--reset
清除所有通知设置

tigris buckets set-cors <name>

tigris buckets set-cors <name>

Configure CORS rules on a bucket. Each invocation adds a rule unless
--override
or
--reset
is used.
bash
tigris buckets set-cors my-bucket --origins '*' --methods GET,HEAD
tigris buckets set-cors my-bucket --origins https://example.com --methods GET,POST --headers Content-Type,Authorization --max-age 3600
tigris buckets set-cors my-bucket --origins https://example.com --override
tigris buckets set-cors my-bucket --reset
FlagAliasDescription
--origins
-o
Allowed origins (comma-separated, or
*
for all)
--methods
-m
Allowed HTTP methods (comma-separated)
--headers
Allowed request headers (comma-separated, or
*
)
--expose-headers
Response headers to expose (comma-separated)
--max-age
Preflight cache duration in seconds (default:
3600
)
--override
Replace all existing CORS rules instead of appending
--reset
Clear all CORS rules
配置存储桶的CORS规则。除非使用
--override
--reset
,否则每次调用都会添加一条规则。
bash
tigris buckets set-cors my-bucket --origins '*' --methods GET,HEAD
tigris buckets set-cors my-bucket --origins https://example.com --methods GET,POST --headers Content-Type,Authorization --max-age 3600
tigris buckets set-cors my-bucket --origins https://example.com --override
tigris buckets set-cors my-bucket --reset
参数选项别名描述
--origins
-o
允许的源(逗号分隔,或
*
表示所有源)
--methods
-m
允许的HTTP方法(逗号分隔)
--headers
允许的请求头(逗号分隔,或
*
--expose-headers
要暴露的响应头(逗号分隔)
--max-age
预检请求缓存时长(秒,默认:
3600
--override
替换所有现有CORS规则,而非追加
--reset
清除所有CORS规则

Snapshots

快照

Snapshots are point-in-time, read-only copies of a bucket's state. The bucket must be created with
--enable-snapshots
.
快照是存储桶状态的只读时间点副本。存储桶必须在创建时使用
--enable-snapshots
才能启用快照功能。

tigris snapshots list <bucket>
(alias:
l
)

tigris snapshots list <bucket>
(别名:
l

List all snapshots for a bucket, ordered by creation time.
bash
tigris snapshots list my-bucket
tigris snapshots list my-bucket --json
FlagDescription
--format
/
-f
Output format (
json
,
table
,
xml
; default:
table
)
--json
Output as JSON
列出存储桶的所有快照,按创建时间排序。
bash
tigris snapshots list my-bucket
tigris snapshots list my-bucket --json
参数选项描述
--format
/
-f
输出格式(
json
table
xml
;默认:
table
--json
以JSON格式输出

tigris snapshots take <bucket> [name]
(alias:
t
)

tigris snapshots take <bucket> [name]
(别名:
t

Take a new snapshot of the bucket's current state. Optionally provide a name.
bash
tigris snapshots take my-bucket
tigris snapshots take my-bucket my-snapshot
创建存储桶当前状态的新快照。可选择性指定快照名称。
bash
tigris snapshots take my-bucket
tigris snapshots take my-bucket my-snapshot

Forks

分支

Forks are copy-on-write clones of a bucket. They are instant, free, and isolated — writes to the fork do not affect the source bucket.
分支是存储桶的写时复制克隆。创建即时、免费且相互隔离——对分支的写入操作不会影响源存储桶。

Create a fork

创建分支

bash
undefined
bash
undefined

Preferred: use mk or buckets create with --fork-of

推荐方式:使用mk或buckets create配合--fork-of参数

tigris mk my-fork --fork-of my-bucket tigris mk my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
tigris mk my-fork --fork-of my-bucket tigris mk my-fork --fork-of my-bucket --source-snapshot 1765889000501544464

Equivalent via buckets create

等价于使用buckets create命令

tigris buckets create my-fork --fork-of my-bucket tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
undefined
tigris buckets create my-fork --fork-of my-bucket tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
undefined

List forks

列出分支

bash
tigris buckets list --forks-of my-bucket
Deprecated commands:
tigris forks list
and
tigris forks create
still work but are deprecated. Use
tigris buckets list --forks-of
and
tigris mk --fork-of
instead.
bash
tigris buckets list --forks-of my-bucket
已废弃命令:
tigris forks list
tigris forks create
仍可使用但已废弃。请改用
tigris buckets list --forks-of
tigris mk --fork-of

Reference Tables

参考表格

Storage Tiers

存储层级

TierValueDescription
Standard
STANDARD
Default. High durability, availability, and performance for frequently accessed data
Infrequent Access
STANDARD_IA
Lower-cost for data accessed less frequently but requiring rapid access when needed
Archive
GLACIER
Low-cost for long-term data archiving with infrequent access
Instant Retrieval Archive
GLACIER_IR
Lowest-cost for long-lived, rarely accessed data requiring retrieval in milliseconds
层级名称描述
标准层级
STANDARD
默认层级。针对频繁访问数据提供高持久性、可用性和性能
低频访问层级
STANDARD_IA
低成本层级,适用于访问频率较低但需要快速访问的数据
归档层级
GLACIER
低成本层级,适用于长期归档且访问频率极低的数据
即时检索归档层级
GLACIER_IR
成本最低的层级,适用于长期存储、极少访问但需要毫秒级检索速度的数据

Locations

存储位置

NameValueDescription
Global
global
Global (default)
USA
usa
Restrict to USA
Europe
eur
Restrict to Europe
Amsterdam
ams
Amsterdam, Netherlands
Frankfurt
fra
Frankfurt, Germany
Sao Paulo
gru
Sao Paulo, Brazil
Ashburn
iad
Ashburn, Virginia (US)
Johannesburg
jnb
Johannesburg, South Africa
London
lhr
London, United Kingdom
Tokyo
nrt
Tokyo, Japan
Chicago
ord
Chicago, Illinois (US)
Singapore
sin
Singapore, Singapore
San Jose
sjc
San Jose, California (US)
Sydney
syd
Sydney, Australia
名称描述
全球
global
全球范围(默认)
美国
usa
仅限美国区域
欧洲
eur
仅限欧洲区域
阿姆斯特丹
ams
荷兰阿姆斯特丹
法兰克福
fra
德国法兰克福
圣保罗
gru
巴西圣保罗
阿什本
iad
美国弗吉尼亚州阿什本
约翰内斯堡
jnb
南非约翰内斯堡
伦敦
lhr
英国伦敦
东京
nrt
日本东京
芝加哥
ord
美国伊利诺伊州芝加哥
新加坡
sin
新加坡
圣何塞
sjc
美国加利福尼亚州圣何塞
悉尼
syd
澳大利亚悉尼

Consistency Levels (deprecated — use
--locations
instead)

一致性级别(已废弃——请使用
--locations
替代)

LevelValueDescription
Default
default
Strict read-after-write in same region, eventual consistency globally
Strict
strict
Strict read-after-write globally (higher latency)
级别描述
默认级别
default
同区域严格读写一致性,全球范围最终一致性
严格级别
strict
全球范围严格读写一致性(延迟较高)