Skip to content

Commit 472cf72

Browse files
authored
[R2 Data Catalog] Add wrangler commands for the R2 Data Catalog snaps… (#11646)
1 parent cb306cf commit 472cf72

File tree

5 files changed

+802
-4
lines changed

5 files changed

+802
-4
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
feat: add R2 Data Catalog snapshot expiration commands
6+
7+
Adds new commands to manage automatic snapshot expiration for R2 Data Catalog tables:
8+
9+
- `wrangler r2 bucket catalog snapshot-expiration enable` - Enable automatic snapshot expiration
10+
- `wrangler r2 bucket catalog snapshot-expiration disable` - Disable automatic snapshot expiration
11+
12+
Snapshot expiration helps manage storage costs by automatically removing old table snapshots while keeping a minimum number of recent snapshots for recovery purposes.
13+
14+
Example usage:
15+
16+
```sh
17+
# Enable snapshot expiration for entire catalog (keep 10 snapshots, expire after 5 days)
18+
wrangler r2 bucket catalog snapshot-expiration enable my-bucket --token $R2_CATALOG_TOKEN --max-age 7200 --min-count 10
19+
20+
# Enable for specific table
21+
wrangler r2 bucket catalog snapshot-expiration enable my-bucket my-namespace my-table --token $R2_CATALOG_TOKEN --max-age 2880 --min-count 5
22+
23+
# Disable snapshot expiration
24+
wrangler r2 bucket catalog snapshot-expiration disable my-bucket
25+
```

0 commit comments

Comments
 (0)