Back to Skills

r2-glacier-migration

verified

Monitor and manage R2 to AWS Glacier Deep Archive migration. Use when checking transfer status, resuming transfers, or managing the archive migration.

View on GitHub

Repository

pollinations/pollinations
3.8kstars

.claude/skills/r2-glacier-migration/SKILL.md

Last Verified

January 18, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pollinations/pollinations/blob/24fa50854ebe4489d1730132800da75ecac2574d/.claude/skills/r2-glacier-migration/SKILL.md -a claude-code --skill r2-glacier-migration

Installation paths:

Claude
.claude/skills/r2-glacier-migration/
Powered by add-skill CLI

Instructions

# R2 โ†’ AWS Glacier Deep Archive Migration

Migrate ~42.6 TB from Cloudflare R2 to AWS S3 Glacier Deep Archive.

## Cost Savings

- **R2**: ~$638/month โ†’ **Glacier**: ~$42/month
- **Savings**: ~$596/month

## Buckets

| Bucket | Size | Objects | Status |
|--------|------|---------|--------|
| pollinations-text | 16.96 TB | 1.86B | ๐Ÿ”„ In progress |
| pollinations-images | 25.64 TB | 221M | โณ Pending |

---

# Quick Commands

## Check Status

```bash
# Is transfer running?
ssh ninon "screen -ls"

# View recent logs
ssh ninon "tail -50 ~/r2-glacier/transfer-text.log"

# Check checkpoint
ssh ninon "cat /tmp/r2-glacier-pollinations-text-checkpoint.json | jq ."
```

## Attach to Screen (Interactive)

```bash
ssh -t ninon "screen -r r2-text"
# Detach: Ctrl+A, D
```

## Resume if Crashed

```bash
ssh ninon "screen -dmS r2-text bash -c '~/r2-glacier/run-text-transfer.sh; exec bash'"
```

---

# File Locations

| Location | Path | Purpose |
|----------|------|---------|
| Skill | [scripts/r2-to-glacier-streaming.js](scripts/r2-to-glacier-streaming.js) | Main transfer script |
| Skill | [scripts/package.json](scripts/package.json) | Dependencies |
| ninon | `~/r2-glacier/` | Deployed script + deps |
| ninon | `~/r2-glacier/run-text-transfer.sh` | Wrapper with credentials |
| ninon | `~/r2-glacier/transfer-text.log` | Transfer log |
| ninon | `/tmp/r2-glacier-*-checkpoint.json` | Resume checkpoint |

---

# Script Usage

```bash
# Test (small batch)
node r2-to-glacier-streaming.js -b pollinations-text --batch-size 100 --max-batches 1

# Full transfer
node r2-to-glacier-streaming.js -b pollinations-text --batch-size 50000 --concurrency 30

# Resume after interruption
node r2-to-glacier-streaming.js -b pollinations-text --resume

# Dry run (count only)
node r2-to-glacier-streaming.js -b pollinations-text --dry-run
```

---

# AWS Setup

- **Bucket**: `s3://pollinations-archive`
- **Region**: us-east-1
- **Storage Class**: DEEP_ARCHIVE

## Verify Archives

```bash
aws s3 ls s3://po

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2715 chars