nx1x/Cloudflare R2 Backup
Upload, verify, list, and prune backups in Cloudflare R2 from GitHub Actions. Zero telemetry, AWS CLI under the hood.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| operation | Operation to run: upload | verify | list | prune | yes | — |
| account-id | Cloudflare account ID. Used to derive the R2 endpoint unless endpoint-url is set. | yes | — |
| access-key-id | R2 API access key ID | yes | — |
| secret-access-key | R2 API secret access key | yes | — |
| bucket | R2 bucket name | yes | — |
| prefix | Path prefix inside the bucket (e.g. "daily-backups/"). Used by upload, list, and prune. | no | "" |
| file | Local file path. Required for upload. Used as a download target for verify. | no | "" |
| object-key | Explicit object key. For upload, defaults to prefix + basename(file). For verify, required. | no | "" |
| retention-days | Delete objects under prefix older than N days. Empty disables age-based prune. | no | "" |
| retention-count | Keep only the newest N objects under prefix. Empty disables count-based prune. | no | "" |
| verify-mode | Integrity check (verify op): tar | zip | sha256. | no | "" |
| verify-checksum | Expected sha256 hex digest (required when verify-mode=sha256). | no | "" |
| max-keys | Maximum number of objects to return (list op). | no | "" |
| endpoint-url | Override the R2 endpoint URL. Default: https://<account-id>.r2.cloudflarestorage.com | no | "" |
Outputs
| name | description |
|---|---|
| object-key | Full object key written to or verified in R2. |
| size | Size in bytes of the uploaded or verified object. |
| pruned-count | Number of objects deleted by retention. |
| verified | true if integrity check passed (verify op). |
| objects | JSON array of objects under prefix (list op). |
| count | Number of objects returned by list op. |
| total-size | Total size in bytes of objects returned by list op. |